类的使用
org.bukkit.enchantments.Enchantment
-
org.bukkit中Enchantment的使用
-
org.bukkit.enchantments中Enchantment的使用
修饰符和类型字段说明static final Enchantment
Enchantment.AQUA_AFFINITY
附魔:水下速掘static final Enchantment
Enchantment.BANE_OF_ARTHROPODS
附魔:节肢杀手static final Enchantment
Enchantment.BINDING_CURSE
附魔:绑定诅咒static final Enchantment
Enchantment.BLAST_PROTECTION
附魔:爆炸保护static final Enchantment
Enchantment.BREACH
Reduces armor effectiveness against macesstatic final Enchantment
Enchantment.CHANNELING
附魔:引雷 (三叉戟)static final Enchantment
Enchantment.DENSITY
Increases fall damage of macesstatic final Enchantment
Enchantment.DEPTH_STRIDER
附魔:深海探索者static final Enchantment
Enchantment.EFFICIENCY
附魔:效率static final Enchantment
Enchantment.FEATHER_FALLING
附魔:摔落保护static final Enchantment
Enchantment.FIRE_ASPECT
附魔:火焰附加static final Enchantment
Enchantment.FIRE_PROTECTION
附魔:火焰保护static final Enchantment
Enchantment.FLAME
附魔:火矢 (弓)static final Enchantment
Enchantment.FORTUNE
附魔:时运static final Enchantment
Enchantment.FROST_WALKER
附魔:冰霜行者static final Enchantment
Enchantment.IMPALING
附魔:穿刺 (三叉戟)static final Enchantment
Enchantment.INFINITY
附魔:无限 (弓)static final Enchantment
Enchantment.KNOCKBACK
附魔:击退static final Enchantment
Enchantment.LOOTING
附魔:抢夺static final Enchantment
Enchantment.LOYALTY
附魔:忠诚 (三叉戟)static final Enchantment
Enchantment.LUCK_OF_THE_SEA
附魔:海之眷顾 (钓鱼杆)static final Enchantment
Enchantment.LURE
附魔:饵钓 (钓鱼杆)static final Enchantment
Enchantment.MENDING
附魔:经验修补static final Enchantment
Enchantment.MULTISHOT
附魔:多重射击 (弩)static final Enchantment
Enchantment.PIERCING
附魔:穿透 (弩)static final Enchantment
Enchantment.POWER
附魔:力量 (弓)static final Enchantment
Enchantment.PROJECTILE_PROTECTION
附魔:弹射物保护static final Enchantment
Enchantment.PROTECTION
附魔:保护static final Enchantment
Enchantment.PUNCH
附魔:冲击 (弓)static final Enchantment
Enchantment.QUICK_CHARGE
附魔:快速装填 (弩)static final Enchantment
Enchantment.RESPIRATION
附魔:水下呼吸static final Enchantment
Enchantment.RIPTIDE
附魔:激流 (三叉戟)static final Enchantment
Enchantment.SHARPNESS
附魔:锋利static final Enchantment
Enchantment.SILK_TOUCH
附魔:精准采集static final Enchantment
Enchantment.SMITE
附魔:亡灵杀手static final Enchantment
Enchantment.SOUL_SPEED
附魔:灵魂疾行static final Enchantment
Enchantment.SWEEPING_EDGE
附魔:横扫之刃static final Enchantment
Enchantment.SWIFT_SNEAK
附魔:迅捷潜行static final Enchantment
Enchantment.THORNS
附魔:荆棘static final Enchantment
Enchantment.UNBREAKING
附魔:耐久static final Enchantment
Enchantment.VANISHING_CURSE
附魔:消失诅咒static final Enchantment
Enchantment.WIND_BURST
Emits wind burst upon hitting enemy修饰符和类型方法说明static @Nullable Enchantment
Enchantment.getByKey
(@Nullable NamespacedKey key) 已过时。仅为保障作向后兼容性, 请使用Registry.get(NamespacedKey)
insteadstatic @Nullable Enchantment
已过时。这些附魔的命名简直糟透了,建议使用getByKey(org.bukkit.NamespacedKey)
.EnchantmentOffer.getEnchantment()
获取魔咒/附魔种类.EnchantmentWrapper.getEnchantment()
已过时。获取这个包装类所对应的的附魔.static @NotNull Enchantment[]
Enchantment.values()
已过时。修饰符和类型方法说明abstract boolean
Enchantment.conflictsWith
(@NotNull Enchantment other) 检查这个附魔是否与另外的附魔冲突.void
EnchantmentOffer.setEnchantment
(@NotNull Enchantment enchantment) 设置魔咒/附魔种类. -
org.bukkit.event.enchantment中Enchantment的使用
修饰符和类型方法说明EnchantItemEvent.getEnchantmentHint()
Get theEnchantment
that was displayed as a hint to the player on the selected enchantment offer.限定符构造器说明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) 限定符构造器说明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) -
org.bukkit.inventory中Enchantment的使用
修饰符和类型方法说明void
ItemStack.addEnchantment
(@NotNull Enchantment ench, int level) 向物品堆添加附魔
.void
ItemStack.addUnsafeEnchantment
(@NotNull Enchantment ench, int level) 向物品堆添加附魔
.boolean
ItemStack.containsEnchantment
(@NotNull Enchantment ench) 检测该物品堆是否包含指定附魔
.int
ItemStack.getEnchantmentLevel
(@NotNull Enchantment ench) 获取该物品指定附魔的附魔等级.int
ItemStack.removeEnchantment
(@NotNull Enchantment ench) 移除指定的附魔
.修饰符和类型方法说明void
ItemStack.addEnchantments
(@NotNull Map<Enchantment, Integer> enchantments) 向物品堆添加附魔.void
ItemStack.addUnsafeEnchantments
(@NotNull Map<Enchantment, Integer> enchantments) 以不安全的方式向物品堆添加附魔. -
org.bukkit.inventory.meta中Enchantment的使用
修饰符和类型方法说明ItemMeta.getEnchants()
返回此物品上的附魔的 map 副本.
如果物品没有附魔则返回空 map.EnchantmentStorageMeta.getStoredEnchants()
获取在ItemMeta存储的附魔的副本.修饰符和类型方法说明boolean
ItemMeta.addEnchant
(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) 为物品添加一个附魔.boolean
EnchantmentStorageMeta.addStoredEnchant
(@NotNull Enchantment ench, int level, boolean ignoreLevelRestriction) 向本物品存放一个指定的附魔.int
ItemMeta.getEnchantLevel
(@NotNull Enchantment ench) 获取物品上指定附魔的等级.int
EnchantmentStorageMeta.getStoredEnchantLevel
(@NotNull Enchantment ench) 检测指定附魔的等级.boolean
ItemMeta.hasConflictingEnchant
(@NotNull Enchantment ench) 检查指定的附魔是否与任何 ItemMeta 里的附魔冲突.boolean
EnchantmentStorageMeta.hasConflictingStoredEnchant
(@NotNull Enchantment ench) 检测指定的附魔是否与任何 ItemMeta 里的附魔冲突.boolean
ItemMeta.hasEnchant
(@NotNull Enchantment ench) 检查物品是否存在指定的附魔.boolean
EnchantmentStorageMeta.hasStoredEnchant
(@NotNull Enchantment ench) 检测是否存储特定的附魔.boolean
ItemMeta.removeEnchant
(@NotNull Enchantment ench) 移除物品上指定的附魔.boolean
EnchantmentStorageMeta.removeStoredEnchant
(@NotNull Enchantment ench) 移除物品上指定的附魔.