Class PlayerEvent.TabListNameFormat

java.lang.Object
net.minecraftforge.eventbus.api.Event
Enclosing class:
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 ForgeEventFactory.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 Cancelable.
This event does not have a result. Event.HasResult
This event is fired on the MinecraftForge.EVENT_BUS.
  • Field Details

    • displayName

      @Nullable private Component displayName
  • Constructor Details

    • TabListNameFormat

      public TabListNameFormat(Player player)
  • Method Details

    • getDisplayName

      @Nullable public Component getDisplayName()
    • setDisplayName

      public void setDisplayName(@Nullable Component displayName)