类 PlayerItemConsumeEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerItemConsumeEvent
所有已实现的接口:
Cancellable

public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable
当玩家消耗完物品时, 此事件将触发 例如:(食物, 药水, 牛奶桶).
如果修改了ItemStack,服务器将使用新ItemStack的效果,而不是从玩家的背包中删除原始ItemStack。
如果事件被取消,则不会应用效果,并且不会从玩家的背包中删除该ItemStack。

原文: This event will fire when a player is finishing consuming an item (food, potion, milk bucket).
If the ItemStack is modified the server will use the effects of the new item and not remove the original one from the player's inventory.
If the event is cancelled the effect will not be applied and the item will not be removed from the player's inventory.