Class ItemUpdateStateEvent

java.lang.Object
net.minestom.server.event.item.ItemUpdateStateEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, ItemEvent, PlayerEvent, PlayerInstanceEvent

public class ItemUpdateStateEvent extends Object implements PlayerInstanceEvent, ItemEvent
Event when a player updates an item state, meaning when they stop using the item.
  • Constructor Details

    • ItemUpdateStateEvent

      public ItemUpdateStateEvent(@NotNull @NotNull Player player, @NotNull Player.Hand hand, @NotNull @NotNull ItemStack itemStack)
  • Method Details

    • getHand

      @NotNull public Player.Hand 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

      @NotNull public @NotNull ItemStack getItemStack()
      Specified by:
      getItemStack in interface ItemEvent
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player