public class TextHoverEvent extends AHoverEvent
action| Constructor and Description |
|---|
TextHoverEvent(HoverEventAction action,
ATextComponent text) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
ATextComponent |
getText() |
int |
hashCode() |
TextHoverEvent |
setAction(HoverEventAction action)
Set the action of the hover event.
|
TextHoverEvent |
setText(ATextComponent text)
Set the text of this hover event.
|
TextHoverEvent |
toLegacy(TextComponentSerializer textComponentSerializer,
net.lenni0451.mcstructs.snbt.SNbtSerializer<?> sNbtSerializer)
Converts this hover event to a legacy text hover event.
|
java.lang.String |
toString() |
getActionpublic TextHoverEvent(HoverEventAction action, ATextComponent text)
public TextHoverEvent setAction(HoverEventAction action)
HoverEventAction.SHOW_TEXT will result in legacy hover events.action - The new actionpublic ATextComponent getText()
public TextHoverEvent setText(ATextComponent text)
text - The new textpublic TextHoverEvent toLegacy(TextComponentSerializer textComponentSerializer, net.lenni0451.mcstructs.snbt.SNbtSerializer<?> sNbtSerializer)
AHoverEventtoLegacy in class AHoverEventtextComponentSerializer - The serializer to use for text componentssNbtSerializer - The serializer to use for nbt tagspublic boolean equals(java.lang.Object o)
equals in class AHoverEventpublic int hashCode()
hashCode in class AHoverEventpublic java.lang.String toString()
toString in class AHoverEvent