类的使用
org.bukkit.enchantments.Enchantment
-
org.bukkit.enchantments中Enchantment的使用
修饰符和类型字段说明static final Enchantment
Enchantment.ARROW_DAMAGE
附魔:力量 (弓)static final Enchantment
Enchantment.ARROW_FIRE
附魔:火焰附加 (弓)static final Enchantment
Enchantment.ARROW_INFINITE
附魔:无限 (弓)static final Enchantment
Enchantment.ARROW_KNOCKBACK
附魔:击退 (弓)static final Enchantment
Enchantment.BINDING_CURSE
Item cannot be removedstatic final Enchantment
Enchantment.DAMAGE_ALL
附魔:锋利static final Enchantment
Enchantment.DAMAGE_ARTHROPODS
附魔:节肢杀手static final Enchantment
Enchantment.DAMAGE_UNDEAD
附魔:亡灵杀手static final Enchantment
Enchantment.DEPTH_STRIDER
附魔:海底漫步static final Enchantment
Enchantment.DIG_SPEED
附魔:效率static final Enchantment
Enchantment.DURABILITY
附魔:耐久static final Enchantment
Enchantment.FIRE_ASPECT
附魔:火焰附加static final Enchantment
Enchantment.FROST_WALKER
附魔:冰霜行者static final Enchantment
Enchantment.KNOCKBACK
附魔:击退static final Enchantment
Enchantment.LOOT_BONUS_BLOCKS
附魔:时运static final Enchantment
Enchantment.LOOT_BONUS_MOBS
附魔:抢夺static final Enchantment
Enchantment.LUCK
附魔:海之眷顾 (钓鱼杆)static final Enchantment
Enchantment.LURE
附魔:诱饵 (钓鱼杆)static final Enchantment
Enchantment.MENDING
附魔:经验修补static final Enchantment
Enchantment.OXYGEN
附魔:水肺static final Enchantment
Enchantment.PROTECTION_ENVIRONMENTAL
附魔:保护static final Enchantment
Enchantment.PROTECTION_EXPLOSIONS
附魔:爆炸保护static final Enchantment
Enchantment.PROTECTION_FALL
附魔:摔落保护static final Enchantment
Enchantment.PROTECTION_FIRE
附魔:火焰保护static final Enchantment
Enchantment.PROTECTION_PROJECTILE
附魔:抛射物保护static final Enchantment
Enchantment.SILK_TOUCH
附魔:精准采集static final Enchantment
Enchantment.SWEEPING_EDGE
Increases damage against targets when using a sweep attackstatic final Enchantment
Enchantment.THORNS
附魔:荆棘static final Enchantment
Enchantment.VANISHING_CURSE
Item disappears instead of droppingstatic final Enchantment
Enchantment.WATER_WORKER
附魔:水下速掘修饰符和类型方法说明static Enchantment
Enchantment.getById
(int id) 已过时。魔法值static Enchantment
获取附魔的指定名称.EnchantmentOffer.getEnchantment()
Get the type of the enchantment.EnchantmentWrapper.getEnchantment()
得到这个包装类所对应的的附魔.static Enchantment[]
Enchantment.values()
得到所有已经注册了的附魔(Enchantment
s).修饰符和类型方法说明abstract boolean
Enchantment.conflictsWith
(Enchantment other) 检查这个附魔是否与另外的附魔冲突.boolean
EnchantmentWrapper.conflictsWith
(Enchantment other) static void
Enchantment.registerEnchantment
(Enchantment enchantment) 注册一个附魔的ID和对象.void
EnchantmentOffer.setEnchantment
(Enchantment enchantment) Sets the type of the enchantment. -
org.bukkit.event.enchantment中Enchantment的使用
限定符构造器说明EnchantItemEvent
(Player enchanter, InventoryView view, Block table, ItemStack item, int level, Map<Enchantment, Integer> enchants, int i) -
org.bukkit.inventory中Enchantment的使用
修饰符和类型方法说明void
ItemStack.addEnchantment
(Enchantment ench, int level) 向物品堆添加附魔
.void
ItemStack.addUnsafeEnchantment
(Enchantment ench, int level) 向物品堆添加附魔
.boolean
ItemStack.containsEnchantment
(Enchantment ench) 检测该物品堆是否包含指定附魔
.int
ItemStack.getEnchantmentLevel
(Enchantment ench) 获取该物品指定附魔的附魔等级.int
ItemStack.removeEnchantment
(Enchantment ench) 移除指定的附魔
.修饰符和类型方法说明void
ItemStack.addEnchantments
(Map<Enchantment, Integer> enchantments) 向物品堆添加附魔.void
ItemStack.addUnsafeEnchantments
(Map<Enchantment, Integer> enchantments) 以不安全的方式向物品堆添加附魔. -
org.bukkit.inventory.meta中Enchantment的使用
修饰符和类型方法说明ItemMeta.getEnchants()
Returns a copy the enchantments in this ItemMeta.EnchantmentStorageMeta.getStoredEnchants()
获取在ItemMeta存储的附魔的副本.修饰符和类型方法说明boolean
ItemMeta.addEnchant
(Enchantment ench, int level, boolean ignoreLevelRestriction) Adds the specified enchantment to this item meta.boolean
EnchantmentStorageMeta.addStoredEnchant
(Enchantment ench, int level, boolean ignoreLevelRestriction) Stores the specified enchantment in this item meta.int
ItemMeta.getEnchantLevel
(Enchantment ench) Checks for the level of the specified enchantment.int
EnchantmentStorageMeta.getStoredEnchantLevel
(Enchantment ench) Checks for the level of the stored enchantment.boolean
ItemMeta.hasConflictingEnchant
(Enchantment ench) Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.boolean
EnchantmentStorageMeta.hasConflictingStoredEnchant
(Enchantment ench) 检测指定的附魔是否与任何ItemMeta里的附魔冲突.boolean
ItemMeta.hasEnchant
(Enchantment ench) Checks for existence of the specified enchantment.boolean
EnchantmentStorageMeta.hasStoredEnchant
(Enchantment ench) Checks for storage of the specified enchantment.boolean
ItemMeta.removeEnchant
(Enchantment ench) Removes the specified enchantment from this item meta.boolean
EnchantmentStorageMeta.removeStoredEnchant
(Enchantment ench) Remove the specified stored enchantment from this item meta.