public class FoodCalculator
extends java.lang.Object
PlayerItemConsumeEvent| Constructor and Description |
|---|
FoodCalculator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyItemEffects(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack)
Applies status effects based on a consumed item's lore.
|
static void |
tryToConsume(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack)
Lets a player consume an item, if it is valid and the cooldown is ready.
|
public static void tryToConsume(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack)
player - The player who tries to consume the item.itemStack - The item the player tries to consume.Cooldown.playerFoodConsume(Player),
applyItemEffects(Player, ItemStack)public static void applyItemEffects(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemStack)
player - The player consuming the item.itemStack - The item the player consumes.FoodUtils