类 PlayerEvent.TabListNameFormat

封闭类:
PlayerEvent

public static class PlayerEvent.TabListNameFormat extends PlayerEvent
TabListNameFormat is fired when a player's display name for the tablist is retrieved.
This event is fired whenever a player's display name for the tablist is retrieved in ServerPlayer.getTabListDisplayName() or ServerPlayer.refreshTabListName().

This event is fired via the EventHooks.getPlayerTabListDisplayName(Player).

getDisplayName() contains the display name of the player or null if the client should determine the display name itself.
This event is not ICancellableEvent.
This event does not have a result.
引用无效
Event.HasResult

This event is fired on the NeoForge.EVENT_BUS.
  • 字段详细资料

    • displayName

      @Nullable private @Nullable Component displayName
  • 构造器详细资料

    • TabListNameFormat

      public TabListNameFormat(Player player)
  • 方法详细资料

    • getDisplayName

      @Nullable public @Nullable Component getDisplayName()
    • setDisplayName

      public void setDisplayName(@Nullable @Nullable Component displayName)