Package net.minestom.server.event.item
Class PlayerFinishItemUseEvent
java.lang.Object
net.minestom.server.event.item.PlayerFinishItemUseEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,ItemEvent
,PlayerEvent
,PlayerInstanceEvent
Called when a player completely finishes using an item.
getUseDuration()
represents the total time spent using the item.
-
Constructor Summary
ConstructorDescriptionPlayerFinishItemUseEvent
(@NotNull Player player, @NotNull PlayerHand hand, @NotNull ItemStack itemStack, long useDuration) -
Method Summary
Modifier and TypeMethodDescription@NotNull PlayerHand
getHand()
@NotNull ItemStack
@NotNull Player
Gets the player.long
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
-
PlayerFinishItemUseEvent
public PlayerFinishItemUseEvent(@NotNull @NotNull Player player, @NotNull @NotNull PlayerHand hand, @NotNull @NotNull ItemStack itemStack, long useDuration)
-
-
Method Details
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-
getHand
-
getItemStack
- Specified by:
getItemStack
in interfaceItemEvent
-
getUseDuration
public long getUseDuration()
-