Package net.minestom.server.event.player
Class PlayerEatEvent
java.lang.Object
net.minestom.server.event.player.PlayerEatEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,ItemEvent
,PlayerEvent
,PlayerInstanceEvent
Called when a player is finished eating.
-
Constructor Summary
ConstructorDescriptionPlayerEatEvent
(@NotNull Player player, @NotNull ItemStack foodItem, Player.Hand hand) -
Method Summary
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
-
PlayerEatEvent
public PlayerEatEvent(@NotNull @NotNull Player player, @NotNull @NotNull ItemStack foodItem, @NotNull Player.Hand hand)
-
-
Method Details
-
getHand
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-
getItemStack
Gets the food item that has been eaten.- Specified by:
getItemStack
in interfaceItemEvent
- Returns:
- the food item
-