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
-
Constructor Summary
ConstructorsConstructorDescriptionItemUpdateStateEvent(@NotNull Player player, Player.Hand hand, @NotNull ItemStack itemStack) -
Method Summary
Modifier and TypeMethodDescriptiongetHand()@NotNull ItemStack@NotNull PlayerGets the player.booleanbooleanvoidsetHandAnimation(boolean handAnimation) Sets whether the player should have a hand animation.voidsetRiptideSpinAttack(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, waitMethods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstanceMethods 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:
getItemStackin interfaceItemEvent
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-