Class MessageComponent

java.lang.Object
ch.njol.skript.util.chat.MessageComponent

public class MessageComponent extends Object
Component for chat messages. This can be serialized with GSON and then sent to client.
  • Field Details

    • text

      public String text
    • reset

      public boolean reset
      Tells that this component is supposed to reset styling.
    • bold

      public boolean bold
      Makes text bold.
    • italic

      public boolean italic
      Makes text italic.
    • underlined

      public boolean underlined
      Makes texxt underlined.
    • strikethrough

      public boolean strikethrough
      Makes text strikethrough
    • obfuscated

      public boolean obfuscated
      Makes text obfuscated, i.e. each tick the client will scramble all letters with random ones.
    • color

      public @Nullable net.md_5.bungee.api.ChatColor color
      Color of this text. Defaults to reseting it.
    • insertion

      public @Nullable String insertion
      Value of this, if present, will appended on what player is currently writing to chat.
    • clickEvent

      public @Nullable MessageComponent.ClickEvent clickEvent
    • font

      public @Nullable String font
      Font of the component. 1.16+. Null for BaseComponents means default font.
    • hoverEvent

      public @Nullable MessageComponent.HoverEvent hoverEvent
  • Constructor Details

    • MessageComponent

      public MessageComponent()
  • Method Details