Package net.minecraftforge.event.entity.player
package net.minecraftforge.event.entity.player
-
ClassDescriptionThis event is fired when a player gets an advancement.Fired when the player removes a "repaired" item from the Anvil's Output slot.ArrowLooseEvent is fired when a player stops using a bow.
This event is fired whenever a player stops using a bow inItemBow#onPlayerStoppedUsing(ItemStack, World, EntityLivingBase, int)
.
ArrowLooseEvent.bow
contains the ItemBow ItemStack that was used in this event.
ArrowLooseEvent.charge
contains the value for how much the player had charged before stopping the shot.
This event isCancelable
.
If this event is canceled, the player does not stop using the bow.
This event does not have a result.ArrowNockEvent is fired when a player begins using a bow.
This event is fired whenever a player begins using a bow inItemBow#onItemRightClick(World, EntityPlayer, EnumHand)
.
This event is fired on theMinecraftForge.EVENT_BUS
.AttackEntityEvent is fired when a player attacks an Entity.
This event is fired whenever a player attacks an Entity inEntityPlayer#attackTargetEntityWithCurrentItem(Entity)
.
AttackEntityEvent.target
contains the Entity that was damaged by the player.This event is called when a player attempts to use Bonemeal on a block.This event is fired whenever a player attacks an Entity in EntityPlayer#attackTargetEntityWithCurrentItem(Entity).
This event is notCancelable
.
This event has a result.This event is called when a player collides with a EntityItem on the ground.This event is fired when a player attempts to use a Empty bucket, it can be canceled to completely prevent any further processing.This event is called when a player fishes an item.PlayerDestroyItemEvent is fired when a player destroys an item.
This event is fired whenever a player destroys an item inPlayerController#onPlayerDestroyBlock(BlockPos)
,PlayerController#processRightClick(PlayerEntity, World, Hand)
,PlayerController#processRightClickBlock(ClientPlayerEntity, ClientWorld, BlockPos, Direction, Vec3d, Hand)
,PlayerEntity#attackTargetEntityWithCurrentItem(Entity)
,PlayerEntity#damageShield(float)
,PlayerEntity.interactOn(Entity, Hand)
,ForgeHooks.getContainerItem(ItemStack)
,PlayerInteractionManager#processRightClick(PlayerEntity, World, ItemStack, Hand)
,PlayerInteractionManager#processRightClickBlock(PlayerEntity, World, ItemStack, Hand, BlockPos, Direction, float, float, float)
andPlayerInteractionManager#tryHarvestBlock(BlockPos)
.
PlayerDestroyItemEvent.original
contains the original ItemStack before the item was destroyed.PlayerEvent is fired whenever an event involving Living entities occurs.BreakSpeed is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block inEntityPlayer#canHarvestBlock(IBlockState)
.
This event is fired via theForgeEventFactory.getBreakSpeed(EntityPlayer, IBlockState, float, BlockPos)
.
PlayerEvent.BreakSpeed.state
contains the block being broken.Fired when the EntityPlayer is cloned, typically caused by the network sending a RESPAWN_PLAYER event.HarvestCheck is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block inEntityPlayer#canHarvestBlock(IBlockState)
.
This event is fired via theForgeEventFactory.doPlayerHarvestCheck(EntityPlayer, IBlockState, boolean)
.
PlayerEvent.HarvestCheck.state
contains theIBlockState
that is being checked for harvesting.The player is being loaded from the world save.NameFormat is fired when a player's display name is retrieved.
This event is fired whenever a player's name is retrieved inEntityPlayer#getDisplayName()
orEntityPlayer#refreshDisplayName()
.
This event is fired via theForgeEventFactory#getPlayerDisplayName(EntityPlayer, String)
.
PlayerEvent.NameFormat.username
contains the username of the player.Fired when the game type of a server player is changed to a different value than what it was previously.The player is being saved to the world store.Fired when an Entity is started to be "tracked" by this player (the player receives updates about this entity, e.g.Fired when an Entity is stopped to be "tracked" by this player (the player no longer receives updates about this entity, e.g.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 inServerPlayerEntity.getTabListDisplayName()
orServerPlayerEntity.refreshTabListName()
.
This event is fired via theForgeEventFactory.getPlayerTabListDisplayName(PlayerEntity)
.
PlayerEvent.TabListNameFormat.getDisplayName()
contains the display name of the player or null if the client should determine the display name itself.Deprecated.Occurs when a player falls, but is able to fly.PlayerInteractEvent is fired when a player interacts in some way.This event is fired on both sides when the player right clicks an entity.This event is fired on both sides whenever a player right clicks an entity.This event is fired when a player left clicks while targeting a block.This event is fired on the client side when the player left clicks empty space with any ItemStack.This event is fired on both sides whenever the player right clicks while targeting a block.This event is fired on the client side when the player right clicks empty space with an empty hand.This event is fired on both sides before the player triggersnet.minecraft.item.Item#onItemRightClick
.This event is fired when a player's spawn point is set or reset.
The event can be canceled, which will prevent the spawn point from being changed.PlayerSleepInBedEvent is fired when a player sleeps in a bed.This event is fired when the player is waking up.
This is merely for purposes of listening for this to happen.
There is nothing that can be manipulated with this event.PlayerXpEvent is fired whenever an event involving player experience occurs.This event is fired when the player's experience level changes through thePlayerEntity#addExperienceLevel
method.This event is fired after the player collides with an experience orb, but before the player has been given the experience.This event is fired when the player's experience changes through thePlayerEntity.giveExperiencePoints(int)
method.This event is fired when game checks, if sleeping player should be still considered "in bed".
Failing this check will cause player to wake up.
This event has a result.This event is fired when the game checks if players can sleep at this time.
Failing this check will cause sleeping players to wake up and prevent awake players from sleeping.
This event has a result.Deprecated.