Class LiteralText

java.lang.Object
net.minecraft.text.BaseText
net.minecraft.text.LiteralText
All Implemented Interfaces:
com.mojang.brigadier.Message, MutableText, StringVisitable, Text

public class LiteralText
extends BaseText
  • Field Details

    • EMPTY

      public static final Text EMPTY
    • string

      private final String string
  • Constructor Details

    • LiteralText

      public LiteralText​(String string)
  • Method Details

    • getRawString

      public String getRawString()
    • asString

      public String asString()
      Returns the string representation of this text itself, excluding siblings.
      Specified by:
      asString in interface Text
      Overrides:
      asString in class BaseText
    • copy

      public LiteralText copy()
      Description copied from interface: Text
      Copies the text itself, excluding the styles or siblings.
      Specified by:
      copy in interface Text
      Specified by:
      copy in class BaseText
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class BaseText
    • toString

      public String toString()
      Overrides:
      toString in class BaseText