Class Text
java.lang.Object
xyz.gmitch215.socketmc.util.render.text.Text
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JsonText,PaperText,PlainText,SpigotText
Represents a text element to be displayed on the client's screen.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether this text element has a drop shadow.static final intThe height of a single line of text, in pixels. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intgetColor()Gets the color as an ARGB integer.booleanGets whether this text element has a drop shadow.voidsetDropShadow(boolean dropShadow) Sets whether this text element should have a drop shadow.abstract StringtoJSON()Serializes this text element to a JSON string compatible with the Minecraft Component format.
-
Field Details
-
FONT_HEIGHT
public static final int FONT_HEIGHTThe height of a single line of text, in pixels.- See Also:
-
dropShadow
protected boolean dropShadowWhether this text element has a drop shadow.
-
-
Constructor Details
-
Text
protected Text()Constructs a new text element.
-
-
Method Details
-
isDropShadow
public boolean isDropShadow()Gets whether this text element has a drop shadow.- Returns:
- Drop Shadow
-
setDropShadow
public void setDropShadow(boolean dropShadow) Sets whether this text element should have a drop shadow.- Parameters:
dropShadow- Drop Shadow
-
getColor
public abstract int getColor()Gets the color as an ARGB integer.- Returns:
- String Color
-
toJSON
Serializes this text element to a JSON string compatible with the Minecraft Component format.- Returns:
- JSON String
-