Class PlayerEvent.TabListNameFormat

Enclosing class:

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 ServerPlayerEntity.getTabListDisplayName() or ServerPlayerEntity.refreshTabListName().

This event is fired via the ForgeEventFactory.getPlayerTabListDisplayName(PlayerEntity).

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

  • Constructor Details

    • TabListNameFormat

      public TabListNameFormat(PlayerEntity player)
  • Method Details

    • getDisplayName

      @Nullable public ITextComponent getDisplayName()
    • setDisplayName

      public void setDisplayName(@Nullable ITextComponent displayName)