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

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

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

      @Nullable public @Nullable MessageComponent.ClickEvent clickEvent
    • font

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

      @Nullable public @Nullable String translation
    • keybind

      @Nullable public @Nullable String keybind
    • hoverEvent

      @Nullable public @Nullable MessageComponent.HoverEvent hoverEvent
  • Constructor Details

    • MessageComponent

      public MessageComponent()
  • Method Details