Package net.minestom.server.event.item
Class ItemUpdateStateEvent
java.lang.Object
net.minestom.server.event.item.ItemUpdateStateEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,ItemEvent
,PlayerEvent
,PlayerInstanceEvent
Event when a player updates an item state, meaning when they stop using the item.
-
Constructor Summary
ConstructorDescriptionItemUpdateStateEvent
(@NotNull Player player, Player.Hand hand, @NotNull ItemStack itemStack) -
Method Summary
Modifier and TypeMethodDescriptiongetHand()
@NotNull ItemStack
@NotNull Player
Gets the player.boolean
boolean
void
setHandAnimation
(boolean handAnimation) Sets whether the player should have a hand animation.void
setRiptideSpinAttack
(boolean riptideSpinAttack) Sets whether the player should have a riptide spin attack animation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
ItemUpdateStateEvent
public ItemUpdateStateEvent(@NotNull @NotNull Player player, @NotNull Player.Hand hand, @NotNull @NotNull ItemStack itemStack)
-
-
Method Details
-
getHand
-
setHandAnimation
public void setHandAnimation(boolean handAnimation) Sets whether the player should have a hand animation.- Parameters:
handAnimation
- whether the player should have a hand animation
-
hasHandAnimation
public boolean hasHandAnimation() -
setRiptideSpinAttack
public void setRiptideSpinAttack(boolean riptideSpinAttack) Sets whether the player should have a riptide spin attack animation.- Parameters:
riptideSpinAttack
- whether the player should have a riptide spin attack animation
-
isRiptideSpinAttack
public boolean isRiptideSpinAttack() -
getItemStack
- Specified by:
getItemStack
in interfaceItemEvent
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-