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.ItemCraftedEvent |
static class |
PlayerEvent.ItemPickupEvent |
static class |
PlayerEvent.ItemSmeltedEvent |
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 PlayerEntity.getDisplayName() for the first time or if PlayerEntity.refreshDisplayName() is called.This event is fired via ForgeEventFactory.getPlayerDisplayName(PlayerEntity, String) or ForgeEventFactory.getPlayerDisplayName(PlayerEntity, ITextComponent) .PlayerEvent.NameFormat.username contains the username of the player. |
static class |
PlayerEvent.PlayerChangedDimensionEvent |
static class |
PlayerEvent.PlayerLoggedInEvent |
static class |
PlayerEvent.PlayerLoggedOutEvent |
static class |
PlayerEvent.PlayerRespawnEvent |
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.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private PlayerEntity |
entityPlayer |
Constructor and Description |
---|
PlayerEvent(PlayerEntity player) |
Modifier and Type | Method and Description |
---|---|
PlayerEntity |
getPlayer() |
getEntityLiving
getEntity
private final PlayerEntity entityPlayer
public PlayerEvent(PlayerEntity player)
public PlayerEntity getPlayer()