Class Nameplate

java.lang.Object
com.hypixel.hytale.server.core.entity.nameplate.Nameplate
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class Nameplate extends Object implements Component<EntityStore>
A component that represents the nameplate of an entity.
  • Field Details

  • Constructor Details

    • Nameplate

      public Nameplate()
      Empty Constructor for a Nameplate instance.

      Used by the codec to parse Nameplate instances.

    • Nameplate

      public Nameplate(@Nonnull String text)
      Default Constructor for a Nameplate instance.
      Parameters:
      text - The text displayed on the nameplate.
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, Nameplate> getComponentType()
      Returns:
      the component type for the Nameplate component.
    • getText

      @Nonnull public String getText()
      Returns:
      whether the nameplate is visible.
    • setText

      public void setText(@Nonnull String text)
      Called to set the text displayed on the nameplate.
      Parameters:
      text - The text to set.
    • consumeNetworkOutdated

      public boolean consumeNetworkOutdated()
      Called to consume and return whether the nameplate data is outdated and needs to be sent to clients.
      Returns:
      true if outdated, false otherwise.
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.