Class PlayerFinishItemUseEvent

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

public class PlayerFinishItemUseEvent extends Object implements PlayerInstanceEvent, ItemEvent
Called when a player completely finishes using an item.

getUseDuration() represents the total time spent using the item.

  • Constructor Details

    • PlayerFinishItemUseEvent

      public PlayerFinishItemUseEvent(@NotNull @NotNull Player player, @NotNull @NotNull PlayerHand hand, @NotNull @NotNull ItemStack itemStack, long useDuration)
  • Method Details

    • getPlayer

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

      @NotNull public @NotNull PlayerHand getHand()
    • getItemStack

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

      public long getUseDuration()