Class PlayerEatEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.player.PlayerEatEvent

public class PlayerEatEvent
extends Event
Called when a player is finished eating.
  • Constructor Summary

    Constructors 
    Constructor Description
    PlayerEatEvent​(Player player, ItemStack foodItem)  
  • Method Summary

    Modifier and Type Method Description
    ItemStack getFoodItem()
    Gets the food item that has been eaten.
    Player getPlayer()
    Gets the player who is finished eating.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getPlayer

      @NotNull public Player getPlayer()
      Gets the player who is finished eating.
      Returns:
      the concerned player
    • getFoodItem

      @NotNull public ItemStack getFoodItem()
      Gets the food item that has been eaten.
      Returns:
      the food item