Package net.minestom.server.chat
Class ChatHoverEvent
java.lang.Object
net.minestom.server.chat.ChatHoverEvent
public class ChatHoverEvent
extends java.lang.Object
Represents a hover event for a specific portion of the message.
-
Method Summary
Modifier and Type Method Description protected java.lang.String
getAction()
protected java.lang.String
getValue()
protected com.google.gson.JsonObject
getValueObject()
protected boolean
isJson()
static ChatHoverEvent
showEntity(Entity entity)
Shows an entity when hovered.static ChatHoverEvent
showItem(ItemStack itemStack)
Shows an item when hovered.static ChatHoverEvent
showText(java.lang.String text)
Shows a raw text when hovered.static ChatHoverEvent
showText(ColoredText text)
Shows aColoredText
when hovered.
-
Method Details
-
getAction
@NotNull protected java.lang.String getAction() -
getValue
@Nullable protected java.lang.String getValue() -
getValueObject
@Nullable protected com.google.gson.JsonObject getValueObject() -
isJson
protected boolean isJson() -
showText
Shows aColoredText
when hovered.- Parameters:
text
- the text to show- Returns:
- the chat hover event
-
showText
Shows a raw text when hovered.- Parameters:
text
- the text to show- Returns:
- the chat hover event
-
showItem
Shows an item when hovered.- Parameters:
itemStack
- the item to show- Returns:
- the chat hover event
-
showEntity
Shows an entity when hovered.- Parameters:
entity
- the entity to show- Returns:
- the chat hover event
-