Class PlayerEatEvent

java.lang.Object
net.minestom.server.event.player.PlayerEatEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, ItemEvent, PlayerEvent, PlayerInstanceEvent

public class PlayerEatEvent extends Object implements ItemEvent, PlayerInstanceEvent
Called when a player is finished eating.
  • Constructor Details

    • PlayerEatEvent

      public PlayerEatEvent(@NotNull @NotNull Player player, @NotNull @NotNull ItemStack foodItem, @NotNull Player.Hand hand)
  • Method Details

    • getHand

      @NotNull public Player.Hand getHand()
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player
    • getItemStack

      @NotNull public @NotNull ItemStack getItemStack()
      Gets the food item that has been eaten.
      Specified by:
      getItemStack in interface ItemEvent
      Returns:
      the food item