Class PlayerEvent.NameFormat
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.player.PlayerEvent
net.neoforged.neoforge.event.entity.player.PlayerEvent.NameFormat
- Enclosing class:
PlayerEvent
NameFormat is fired when a player's display name is retrieved.
This event is fired whenever a player's name is retrieved in
This event is fired via the
This event is not
This event does not have a result.
This event is fired on the
This event is fired whenever a player's name is retrieved in
Player.getDisplayName()
or Player.refreshDisplayName()
.This event is fired via the
EventHooks.getPlayerDisplayName(Player, Component)
.username
contains the username of the player.
displayname
contains the display name of the player.
This event is not
ICancellableEvent
.
This event does not have a result.
Event.HasResult
This event is fired on the
NeoForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class net.neoforged.neoforge.event.entity.player.PlayerEvent
getEntity
Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
Field Details
-
username
-
displayname
-
-
Constructor Details
-
NameFormat
-
-
Method Details
-
getUsername
-
getDisplayname
-
setDisplayname
-