java.lang.Object
net.md_5.bungee.api.chat.hover.content.Content
net.md_5.bungee.api.chat.hover.content.Entity

public class Entity extends Content
  • Constructor Details

    • Entity

      public Entity(String type, @NonNull @NonNull String id, BaseComponent name)
      Required for backwards compatibility.
      Parameters:
      type - the type of the entity, for example 'minecraft:pig'
      id - for example '6cb1b229-ce5c-4179-af8d-eea185c25963'
      name - the name of the entity
    • Entity

      public Entity(String type, @NonNull @NonNull String id, BaseComponent name, boolean v1_21_5)
      Creates a new Entity instance.
      Parameters:
      type - Namespaced entity ID. Will use 'minecraft:pig' if null.
      id - Entity UUID in hyphenated hexadecimal format. Should be valid UUID. TODO : validate?
      name - Name to display as the entity. This is optional and will be hidden if null.
      v1_21_5 - True if this entity is for 1.21.5 or later
  • Method Details

    • requiredAction

      public HoverEvent.Action requiredAction()
      Description copied from class: Content
      Required action for this content type.
      Specified by:
      requiredAction in class Content
      Returns:
      action
    • getType

      public String getType()
      Namespaced entity ID. Will use 'minecraft:pig' if null.
    • getId

      @NonNull public @NonNull String getId()
      Entity UUID in hyphenated hexadecimal format. Should be valid UUID. TODO : validate?
    • getName

      public BaseComponent getName()
      Name to display as the entity. This is optional and will be hidden if null.
    • isV1_21_5

      public boolean isV1_21_5()
      True if this entity is for 1.21.5 or later
    • setType

      public void setType(String type)
      Namespaced entity ID. Will use 'minecraft:pig' if null.
    • setId

      public void setId(@NonNull @NonNull String id)
      Entity UUID in hyphenated hexadecimal format. Should be valid UUID. TODO : validate?
    • setName

      public void setName(BaseComponent name)
      Name to display as the entity. This is optional and will be hidden if null.
    • setV1_21_5

      public void setV1_21_5(boolean v1_21_5)
      True if this entity is for 1.21.5 or later
    • toString

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

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

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class Content
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Content