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 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

      @NotNull public static ChatHoverEvent showText​(@NotNull ColoredText text)
      Shows a ColoredText when hovered.
      Parameters:
      text - the text to show
      Returns:
      the chat hover event
    • showText

      @NotNull public static ChatHoverEvent showText​(@NotNull java.lang.String text)
      Shows a raw text when hovered.
      Parameters:
      text - the text to show
      Returns:
      the chat hover event
    • showItem

      @NotNull public static ChatHoverEvent showItem​(@NotNull ItemStack itemStack)
      Shows an item when hovered.
      Parameters:
      itemStack - the item to show
      Returns:
      the chat hover event
    • showEntity

      @NotNull public static ChatHoverEvent showEntity​(@NotNull Entity entity)
      Shows an entity when hovered.
      Parameters:
      entity - the entity to show
      Returns:
      the chat hover event