public class PlayerEvent extends LivingEvent
Event as its parameter, the method will
receive every child event of this class.MinecraftForge.EVENT_BUS.| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerEvent.BreakSpeed
BreakSpeed is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block in EntityPlayer.canHarvestBlock(IBlockState).This event is fired via the ForgeEventFactory.getBreakSpeed(EntityPlayer, IBlockState, float, BlockPos).PlayerEvent.BreakSpeed.state contains the block being broken. |
static class |
PlayerEvent.Clone
Fired when the EntityPlayer is cloned, typically caused by the network sending a RESPAWN_PLAYER event.
|
static class |
PlayerEvent.HarvestCheck
HarvestCheck is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block in EntityPlayer.canHarvestBlock(IBlockState).This event is fired via the ForgeEventFactory.doPlayerHarvestCheck(EntityPlayer, IBlockState, boolean).PlayerEvent.HarvestCheck.state contains the IBlockState that is being checked for harvesting. |
static class |
PlayerEvent.LoadFromFile
The player is being loaded from the world save.
|
static class |
PlayerEvent.NameFormat
NameFormat is fired when a player's display name is retrieved.
This event is fired whenever a player's name is retrieved in EntityPlayer.getDisplayName() or EntityPlayer.refreshDisplayName().This event is fired via the ForgeEventFactory.getPlayerDisplayName(EntityPlayer, String).PlayerEvent.NameFormat.username contains the username of the player. |
static class |
PlayerEvent.SaveToFile
The player is being saved to the world store.
|
static class |
PlayerEvent.StartTracking
Fired when an Entity is started to be "tracked" by this player (the player receives updates about this entity, e.g.
|
static class |
PlayerEvent.StopTracking
Fired when an Entity is stopped to be "tracked" by this player (the player no longer receives updates about this entity, e.g.
|
static class |
PlayerEvent.Visibility
Fired when the world checks if a player is near enough to be attacked by an entity.
|
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Constructor and Description |
|---|
PlayerEvent(EntityPlayer player) |
| Modifier and Type | Method and Description |
|---|---|
EntityPlayer |
getEntityPlayer() |
getEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setuppublic PlayerEvent(EntityPlayer player)
public EntityPlayer getEntityPlayer()