类 PrepareItemEnchantEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.bukkit.event.enchantment.PrepareItemEnchantEvent
所有已实现的接口:
Cancellable

public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellable
物品塞入附魔台的事件 - 可以同时调用。
  • 构造器详细资料

  • 方法详细资料

    • getEnchanter

      public Player getEnchanter()
      获取正在为物品附魔的玩家.

      原文: Gets the player enchanting the item

      返回:
      正在为物品附魔的玩家
    • getEnchantBlock

      public Block getEnchantBlock()
      获取附魔台方块.

      原文: Gets the block being used to enchant the item

      返回:
      附魔台方块
    • getItem

      public ItemStack getItem()
      获取准备附魔的物品(可改动).

      原文: Gets the item to be enchanted (can be modified)

      返回:
      附魔的物品ItemStack对象
    • getExpLevelCostsOffered

      public int[] getExpLevelCostsOffered()
      已过时。
      请换用 getOffers() 方法
      获取附魔所需要的等级的列表.

      原文:Get a list of offered experience level costs of the enchantment.

      返回:
      附魔所需要的等级的列表
    • getOffers

      public EnchantmentOffer[] getOffers()
      Get a list of available EnchantmentOffer for the player. You can modify the values to change the available offers for the player. An offer may be null, if there isn't a enchantment offer at a specific slot. There are 3 slots in the enchantment table available to modify.
      返回:
      list of available enchantment offers
    • getEnchantmentBonus

      public int getEnchantmentBonus()
      Get enchantment bonus in effect - corresponds to number of bookshelves
      返回:
      enchantment bonus
    • 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

      public HandlerList getHandlers()
      覆盖:
      getHandlers 在类中 InventoryEvent
    • getHandlerList

      public static HandlerList getHandlerList()