类 EnchantItemEvent
- 所有已实现的接口:
Cancellable
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.inventory.InventoryEvent
transaction
-
构造器概要
构造器说明EnchantItemEvent
(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment, Integer> enchants, @NotNull Enchantment enchantmentHint, int levelHint, int i) -
方法概要
修饰符和类型方法说明获取附魔这个物品的方块。获取附魔这个物品的玩家。Get theEnchantment
that was displayed as a hint to the player on the selected enchantment offer.获取被加到物品中的附魔的Map (等级, 附魔种类)(若要修改请直接修改Map) .int
获取花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.static @NotNull HandlerList
getItem()
获取被附魔的物品(可改动).int
Get the level of the enchantment that was displayed as a hint to the player on the selected enchantment offer.boolean
获取这个事件是否被取消.一个被取消的事件不会在服务器里执行,但是仍然会传递事件到其他插件.void
setCancelled
(boolean cancel) 取消这个事件.void
setExpLevelCost
(int level) 设置花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.int
获取玩家点击的附魔的按钮。从类继承的方法 org.bukkit.event.inventory.InventoryEvent
getInventory, getView, getViewers
从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
EnchantItemEvent
-
-
方法详细资料
-
getEnchanter
获取附魔这个物品的玩家。原文: Gets the player enchanting the item
- 返回:
- 附魔这个物品的玩家
-
getEnchantBlock
获取附魔这个物品的方块。原文: Gets the block being used to enchant the item
- 返回:
- 附魔这个物品的方块
-
getItem
获取被附魔的物品(可改动).原文: Gets the item to be enchanted (can be modified)
- 返回:
- 被附魔的物品
-
getExpLevelCost
public int getExpLevelCost()获取花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.原文: Gets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.
- 返回:
- 花费的经验等级
-
setExpLevelCost
public void setExpLevelCost(int level) 设置花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.原文: Sets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.
- 参数:
level
- - 花费的经验等级
-
getEnchantsToAdd
获取被加到物品中的附魔的Map (等级, 附魔种类)(若要修改请直接修改Map) . 注意: 不能被添加 到物品中的附魔会被忽略哦。原文: Get map of enchantment (levels, keyed by type) to be added to item - (modify map returned to change values). Note: Any enchantments not - allowed for the item will be ignored
- 返回:
- 被加到物品中的附魔的Map (等级, 附魔种类)
-
getEnchantmentHint
Get theEnchantment
that was displayed as a hint to the player on the selected enchantment offer.- 返回:
- the hinted enchantment
-
getLevelHint
public int getLevelHint()Get the level of the enchantment that was displayed as a hint to the player on the selected enchantment offer.- 返回:
- the level of the hinted enchantment
-
whichButton
public int whichButton()获取玩家点击的附魔的按钮。原文: Which button was pressed to initiate the enchanting.
- 返回:
- 按钮的序号 (0, 1, 2).
-
isCancelled
public boolean isCancelled()从接口复制的说明:Cancellable
获取这个事件是否被取消.一个被取消的事件不会在服务器里执行,但是仍然会传递事件到其他插件.原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
- 指定者:
isCancelled
在接口中Cancellable
- 返回:
- 如果事件已经被取消,则为true
-
setCancelled
public void setCancelled(boolean cancel) 从接口复制的说明:Cancellable
取消这个事件. 一个被取消的事件不会在 服务器里执行,但是仍然会传递事件到其他插件.原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
- 指定者:
setCancelled
在接口中Cancellable
- 参数:
cancel
- 如果你想取消这个事件,则为true
-
getHandlers
- 覆盖:
getHandlers
在类中InventoryEvent
-
getHandlerList
-