public class PlayerFoodLevelChangeEvent extends Object implements PlayerEvent, Cancellable
| Modifier and Type | Field and Description |
|---|---|
protected int |
foodLevel |
protected float |
foodSaturationLevel |
| Constructor and Description |
|---|
PlayerFoodLevelChangeEvent(Player player,
int foodLevel,
float foodSaturationLevel) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFoodLevel() |
float |
getFoodSaturationLevel() |
Player |
getPlayer()
Get the player in question.
|
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
void |
setFoodLevel(int foodLevel) |
void |
setFoodSaturationLevel(float foodSaturationLevel) |
protected int foodLevel
protected float foodSaturationLevel
public PlayerFoodLevelChangeEvent(Player player, int foodLevel, float foodSaturationLevel)
public Player getPlayer()
PlayerEventgetPlayer in interface PlayerEventpublic float getFoodSaturationLevel()
public void setFoodSaturationLevel(float foodSaturationLevel)
public int getFoodLevel()
public void setFoodLevel(int foodLevel)
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true to cancel the event.Copyright © 2017–2019 NukkitX. All rights reserved.