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
ConstructorsConstructorDescriptionPlayerFinishItemUseEvent(@NotNull Player player, @NotNull PlayerHand hand, @NotNull ItemStack itemStack, long useDuration) -
Method Summary
Modifier and TypeMethodDescription@NotNull PlayerHandgetHand()@NotNull ItemStack@NotNull PlayerGets 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 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
-
PlayerFinishItemUseEvent
public PlayerFinishItemUseEvent(@NotNull @NotNull Player player, @NotNull @NotNull PlayerHand hand, @NotNull @NotNull 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.
-