Class ChatModifier

java.lang.Object
me.neznamy.tab.api.chat.ChatModifier

public class ChatModifier extends Object
  • Constructor Details

    • ChatModifier

      public ChatModifier()
    • ChatModifier

      public ChatModifier(ChatModifier modifier)
  • Method Details

    • getColor

      public TextColor getColor()
    • setColor

      public void setColor(TextColor color)
    • getBold

      public Boolean getBold()
    • setBold

      public void setBold(Boolean bold)
    • getItalic

      public Boolean getItalic()
    • setItalic

      public void setItalic(Boolean italic)
    • getUnderlined

      public Boolean getUnderlined()
    • setUnderlined

      public void setUnderlined(Boolean underlined)
    • getStrikethrough

      public Boolean getStrikethrough()
    • setStrikethrough

      public void setStrikethrough(Boolean strikethrough)
    • getObfuscated

      public Boolean getObfuscated()
    • setObfuscated

      public void setObfuscated(Boolean obfuscated)
    • isBold

      public boolean isBold()
      Returns true if bold is defined and set to true, false otherwise
      Returns:
      true if bold is defined and set to true, false otherwise
    • isItalic

      public boolean isItalic()
      Returns true if italic is defined and set to true, false otherwise
      Returns:
      true if italic is defined and set to true, false otherwise
    • isUnderlined

      public boolean isUnderlined()
      Returns true if underlined is defined and set to true, false otherwise
      Returns:
      true if underlined is defined and set to true, false otherwise
    • isStrikethrough

      public boolean isStrikethrough()
      Returns true if strikethrough is defined and set to true, false otherwise
      Returns:
      true if strikethrough is defined and set to true, false otherwise
    • isObfuscated

      public boolean isObfuscated()
      Returns true if obfuscation is defined and set to true, false otherwise
      Returns:
      true if obfuscation is defined and set to true, false otherwise
    • getClickEvent

      public ChatClickable getClickEvent()
    • setClickEvent

      public void setClickEvent(ChatClickable clickEvent)
    • getHoverEvent

      public ChatHoverable getHoverEvent()
    • setHoverEvent

      public void setHoverEvent(ChatHoverable hoverEvent)
    • onClickOpenUrl

      public void onClickOpenUrl(String url)
      Sets click action to OPEN_URL and url to given value
      Parameters:
      url - url to open
    • onClickRunCommand

      public void onClickRunCommand(String command)
      Sets click action to RUN_COMMAND and command to given value
      Parameters:
      command - command to perform, might be without / to send a chat message
    • onClickSuggestCommand

      public void onClickSuggestCommand(String command)
      Sets click action to SUGGEST_COMMAND and command to given value
      Parameters:
      command - command to suggest
    • onClickChangePage

      public void onClickChangePage(int newPage)
      Sets click action to CHANGE_PAGE and page id to given value
      Parameters:
      newPage - id of new page
    • onClickCopyToClipBoard

      public void onClickCopyToClipBoard(String text)
      Sets click action to COPY_TO_CLIPBOARD and text to provided value
      Parameters:
      text - text to copy to clipboard on click
    • onClick

      public void onClick(ChatClickable.EnumClickAction action, String value)
    • onHoverShowText

      public void onHoverShowText(IChatBaseComponent text)
      Sets hover action to SHOW_TEXT and text to given value
      Parameters:
      text - text to show
    • onHoverShowItem

      public void onHoverShowItem(String serializedItem)
      Sets hover action to SHOW_ITEM and item to given value
      Parameters:
      serializedItem - item to show
    • onHoverShowEntity

      public void onHoverShowEntity(String type, UUID id, String name)
      Sets hover action to SHOW_ENTITY and entity data to given values
      Parameters:
      type - entity type
      id - entity uuid
      name - entity custom name
    • onHover

      public void onHover(ChatHoverable.EnumHoverAction action, IChatBaseComponent value)
    • getFont

      public String getFont()
    • setFont

      public void setFont(String font)
    • serialize

      public org.json.simple.JSONObject serialize()
    • getMagicCodes

      public String getMagicCodes()
    • setTargetVersion

      public void setTargetVersion(ProtocolVersion targetVersion)
    • getTargetVersion

      public ProtocolVersion getTargetVersion()