Interface ModelNametag


public interface ModelNametag
Represents a nametag associated with a model part.

Nametags are typically implemented as invisible armor stands or text displays that float above a specific bone.

Since:
1.15.2
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    alwaysVisible(boolean alwaysVisible)
    Sets whether the nametag should always be visible (even through blocks).
    void
    component(@Nullable net.kyori.adventure.text.Component component)
    Sets the text component of the nametag.
    void
    remove(@NotNull PacketBundler bundler)
    Removes the nametag.
    void
    send(@NotNull PlatformPlayer player)
    Sends the nametag packet to a specific player.
    void
    teleport(@NotNull PlatformLocation location)
    Teleports the nametag to a new location.
  • Method Details

    • alwaysVisible

      void alwaysVisible(boolean alwaysVisible)
      Sets whether the nametag should always be visible (even through blocks).
      Parameters:
      alwaysVisible - true for always visible, false otherwise
      Since:
      1.15.2
    • component

      void component(@Nullable @Nullable net.kyori.adventure.text.Component component)
      Sets the text component of the nametag.
      Parameters:
      component - the text component, or null to clear
      Since:
      1.15.2
    • teleport

      void teleport(@NotNull @NotNull PlatformLocation location)
      Teleports the nametag to a new location.
      Parameters:
      location - the target location
      Since:
      1.15.2
    • send

      void send(@NotNull @NotNull PlatformPlayer player)
      Sends the nametag packet to a specific player.
      Parameters:
      player - the target player
      Since:
      1.15.2
    • remove

      void remove(@NotNull @NotNull PacketBundler bundler)
      Removes the nametag.
      Parameters:
      bundler - the packet bundler to use
      Since:
      1.15.2