类 EnchantmentWrapper
java.lang.Object
org.bukkit.enchantments.Enchantment
org.bukkit.enchantments.EnchantmentWrapper
方便选择
Enchantment
s的一个简单的封装类。
大多数方法于Enchantment
。
-
字段概要
从类继承的字段 org.bukkit.enchantments.Enchantment
ARROW_DAMAGE, ARROW_FIRE, ARROW_INFINITE, ARROW_KNOCKBACK, BINDING_CURSE, DAMAGE_ALL, DAMAGE_ARTHROPODS, DAMAGE_UNDEAD, DEPTH_STRIDER, DIG_SPEED, DURABILITY, FIRE_ASPECT, FROST_WALKER, KNOCKBACK, LOOT_BONUS_BLOCKS, LOOT_BONUS_MOBS, LUCK, LURE, MENDING, OXYGEN, PROTECTION_ENVIRONMENTAL, PROTECTION_EXPLOSIONS, PROTECTION_FALL, PROTECTION_FIRE, PROTECTION_PROJECTILE, SILK_TOUCH, SWEEPING_EDGE, THORNS, VANISHING_CURSE, WATER_WORKER
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
canEnchantItem
(ItemStack item) 检查该附魔支不支持某物品.boolean
conflictsWith
(Enchantment other) 检查这个附魔是否与另外的附魔冲突.得到这个包装类所对应的的附魔.得到这个附魔所支持的 物品ItemStack
.int
得到这个附魔所支持的最大等级.getName()
得到这个附魔的名称.int
得到这个附魔的最小等级.boolean
isCursed()
Checks if this enchantment is a cursed enchantment
Cursed enchantments are found the same way treasure enchantments areboolean
Checks if this enchantment is a treasure enchantment.从类继承的方法 org.bukkit.enchantments.Enchantment
equals, getById, getByName, getId, hashCode, isAcceptingRegistrations, registerEnchantment, stopAcceptingRegistrations, toString, values
-
构造器详细资料
-
EnchantmentWrapper
public EnchantmentWrapper(int id)
-
-
方法详细资料
-
getEnchantment
得到这个包装类所对应的的附魔.原文:Gets the enchantment bound to this wrapper
- 返回:
- 附魔
-
getMaxLevel
public int getMaxLevel()从类复制的说明:Enchantment
得到这个附魔所支持的最大等级.原文: Gets the maximum level that this Enchantment may become.
- 指定者:
getMaxLevel
在类中Enchantment
- 返回:
- 这个附魔的最大等级
-
getStartLevel
public int getStartLevel()从类复制的说明:Enchantment
得到这个附魔的最小等级.原文: Gets the level that this Enchantment should start at
- 指定者:
getStartLevel
在类中Enchantment
- 返回:
- 这个附魔最小等级
-
getItemTarget
从类复制的说明:Enchantment
- 指定者:
getItemTarget
在类中Enchantment
- 返回:
- 这个附魔的目标物品.
-
canEnchantItem
从类复制的说明:Enchantment
检查该附魔支不支持某物品.这并不检查任何物品上与它冲突的附魔。
原文:Checks if this Enchantment may be applied to the given
ItemStack
.This does not check if it conflicts with any enchantments already applied to the item.
- 指定者:
canEnchantItem
在类中Enchantment
- 参数:
item
- 物品- 返回:
- True 如果该附魔适用该物品,则返回true。
-
getName
从类复制的说明:Enchantment
得到这个附魔的名称.原文: Gets the unique name of this enchantment
- 指定者:
getName
在类中Enchantment
- 返回:
- 独一无二的名称
-
isTreasure
public boolean isTreasure()从类复制的说明:Enchantment
Checks if this enchantment is a treasure enchantment.
Treasure enchantments can only be received via looting, trading, or fishing.- 指定者:
isTreasure
在类中Enchantment
- 返回:
- true if the enchantment is a treasure enchantment
-
isCursed
public boolean isCursed()从类复制的说明:Enchantment
Checks if this enchantment is a cursed enchantment
Cursed enchantments are found the same way treasure enchantments are- 指定者:
isCursed
在类中Enchantment
- 返回:
- true if the enchantment is cursed
-
conflictsWith
从类复制的说明:Enchantment
检查这个附魔是否与另外的附魔冲突.原文: Check if this enchantment conflicts with another enchantment.
- 指定者:
conflictsWith
在类中Enchantment
- 参数:
other
- 另外一个附魔- 返回:
- 如果这两个附魔是冲突的则返回true
-