Class HoverEvent

java.lang.Object
net.md_5.bungee.api.chat.HoverEvent

public final class HoverEvent extends Object
  • Constructor Details

  • Method Details

    • getValue

      @Deprecated public BaseComponent[] getValue()
      Deprecated.
    • addContent

      public void addContent(Content content) throws UnsupportedOperationException
      Adds a content to this hover event.
      Parameters:
      content - the content add
      Throws:
      IllegalArgumentException - if is a legacy component and already has a content
      UnsupportedOperationException - if content action does not match hover event action
    • getClass

      public static Class<?> getClass(HoverEvent.Action action, boolean array)
      Gets the appropriate Content class for an HoverEvent.Action for the GSON serialization
      Parameters:
      action - the action to get for
      array - if to return the arrayed class
      Returns:
      the class
    • getAction

      public HoverEvent.Action getAction()
      The action of this event.
    • getContents

      public List<Content> getContents()
      List of contents to provide for this event.
    • isLegacy

      public boolean isLegacy()
      Returns whether this hover event is prior to 1.16
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setLegacy

      public void setLegacy(boolean legacy)
      Returns whether this hover event is prior to 1.16