Class PlayerEvent
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
- Direct Known Subclasses:
AdvancementEvent,AnvilRepairEvent,ArrowLooseEvent,ArrowNockEvent,AttackEntityEvent,CanPlayerSleepEvent,CriticalHitEvent,ItemFishedEvent,ItemTooltipEvent,MovementInputUpdateEvent,PermissionsChangedEvent,PlayerBrewedPotionEvent,PlayerContainerEvent,PlayerDestroyItemEvent,PlayerEvent.BreakSpeed,PlayerEvent.Clone,PlayerEvent.HarvestCheck,PlayerEvent.ItemCraftedEvent,PlayerEvent.ItemSmeltedEvent,PlayerEvent.LoadFromFile,PlayerEvent.NameFormat,PlayerEvent.PlayerChangedDimensionEvent,PlayerEvent.PlayerChangeGameModeEvent,PlayerEvent.PlayerLoggedInEvent,PlayerEvent.PlayerLoggedOutEvent,PlayerEvent.PlayerRespawnEvent,PlayerEvent.SaveToFile,PlayerEvent.StartTracking,PlayerEvent.StopTracking,PlayerEvent.TabListNameFormat,PlayerFlyableFallEvent,PlayerHeartTypeEvent,PlayerInteractEvent,PlayerRespawnPositionEvent,PlayerSetSpawnEvent,PlayerSpawnPhantomsEvent,PlayerTickEvent,PlayerWakeUpEvent,PlayerXpEvent,RenderPlayerEvent,StatAwardEvent,TradeWithVillagerEvent
PlayerEvent is fired whenever an event involving a
If a method utilizes this
All children of this event are fired on the
Player occurs. If a method utilizes this
Event as its parameter, the method will
receive every child event of this class.All children of this event are fired on the
NeoForge.EVENT_BUS.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBreakSpeed is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block inPlayer.getDigSpeed(BlockState, BlockPos).
This event is fired via theEventHooks.getBreakSpeed(Player, BlockState, float, BlockPos).
PlayerEvent.BreakSpeed.statecontains the block being broken.static classFired when the EntityPlayer is cloned, typically caused by the impl sending a RESPAWN_PLAYER event.static classHarvestCheck is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block inPlayer.hasCorrectToolForDrops(BlockState).
This event is fired via theEventHooks.doPlayerHarvestCheck(Player, BlockState, BlockGetter, BlockPos).
PlayerEvent.HarvestCheck.statecontains theBlockStatethat is being checked for harvesting.static classstatic classstatic classThe player is being loaded from the world save.static classNameFormat is fired when a player's display name is retrieved.
This event is fired whenever a player's name is retrieved inPlayer.getDisplayName()orPlayer.refreshDisplayName().
This event is fired via theEventHooks.getPlayerDisplayName(Player, Component).
PlayerEvent.NameFormat.usernamecontains the username of the player.static classstatic classFired when the game type of a server player is changed to a different value than what it was previously.static classstatic classstatic classstatic classThe player is being saved to the world store.static classFired when an Entity is started to be "tracked" by this player (the player receives updates about this entity, e.g.static classFired when an Entity is stopped to be "tracked" by this player (the player no longer receives updates about this entity, e.g.static classTabListNameFormat 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 inServerPlayer.getTabListDisplayName()orServerPlayer.refreshTabListName().
This event is fired via theEventHooks.getPlayerTabListDisplayName(Player).
PlayerEvent.TabListNameFormat.getDisplayName()contains the display name of the player or null if the client should determine the display name itself.Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
player
-
-
Constructor Details
-
PlayerEvent
-
-
Method Details
-
getEntity
- Overrides:
getEntityin classLivingEvent
-