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
ConstructorsConstructorDescriptionPlayerFinishItemUseEvent(Player player, PlayerHand hand, ItemStack itemStack, long useDuration) -
Method Summary
Modifier and TypeMethodDescriptiongetHand()Gets the player.longbooleanTrue if this event will transition the player into a riptide spin attack.voidsetRiptideSpinAttack(boolean riptideSpinAttack) True if this event will transition the player into a riptide spin attack.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityInstanceEvent
getInstanceMethods inherited from interface PlayerEvent
getEntity
-
Constructor Details
-
PlayerFinishItemUseEvent
public PlayerFinishItemUseEvent(Player player, PlayerHand hand, ItemStack itemStack, long useDuration)
-
-
Method Details
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-
getHand
-
getItemStack
- Specified by:
getItemStackin interfaceItemEvent
-
getUseDuration
public long getUseDuration() -
isRiptideSpinAttack
public boolean isRiptideSpinAttack()True if this event will transition the player into a riptide spin attack. -
setRiptideSpinAttack
public void setRiptideSpinAttack(boolean riptideSpinAttack) True if this event will transition the player into a riptide spin attack.
-