Minestom/src/main/java/net/minestom/server/event/player/PlayerUseItemEvent.java

28 lines
642 B
Java
Raw Normal View History

package net.minestom.server.event.player;
2019-08-21 16:50:52 +02:00
2020-04-24 03:25:58 +02:00
import net.minestom.server.entity.Player;
import net.minestom.server.event.CancellableEvent;
2020-04-24 03:25:58 +02:00
import net.minestom.server.item.ItemStack;
2019-08-21 16:50:52 +02:00
/**
* Event when an item is used without clicking a block
*/
2020-04-18 15:35:37 +02:00
public class PlayerUseItemEvent extends CancellableEvent {
2019-08-21 16:50:52 +02:00
private Player.Hand hand;
private ItemStack itemStack;
2019-08-25 20:03:43 +02:00
public PlayerUseItemEvent(Player.Hand hand, ItemStack itemStack) {
2019-08-21 16:50:52 +02:00
this.hand = hand;
this.itemStack = itemStack;
}
public Player.Hand getHand() {
return hand;
}
public ItemStack getItemStack() {
return itemStack;
}
}