程序包 | 说明 |
---|---|
org.bukkit.enchantments | |
org.bukkit.event.enchantment | |
org.bukkit.inventory |
参与操作玩家物品栏和物品交互的类.
|
org.bukkit.inventory.meta |
用于操作可以被存储在
物品堆 的额外数据的接口. |
限定符和类型 | 类和说明 |
---|---|
class |
EnchantmentWrapper
方便选择
Enchantment s的一个简单的封装类。 |
限定符和类型 | 字段和说明 |
---|---|
static Enchantment |
Enchantment.ARROW_DAMAGE
附魔:力量 (弓)
原文:
Provides extra damage when shooting arrows from bows
|
static Enchantment |
Enchantment.ARROW_FIRE
附魔:火焰附加 (弓)
原文:
Sets entities on fire when hit by arrows shot from a bow
|
static Enchantment |
Enchantment.ARROW_INFINITE
附魔:无限 (弓)
原文:
Provides infinite arrows when shooting a bow
|
static Enchantment |
Enchantment.ARROW_KNOCKBACK
附魔:击退 (弓)
原文:
Provides a knockback when an entity is hit by an arrow from a bow
|
static Enchantment |
Enchantment.BINDING_CURSE
Item cannot be removed
|
static Enchantment |
Enchantment.DAMAGE_ALL
附魔:锋利
原文:
Increases damage against all targets
|
static Enchantment |
Enchantment.DAMAGE_ARTHROPODS
附魔:节肢杀手
原文:
Increases damage against arthropod targets
|
static Enchantment |
Enchantment.DAMAGE_UNDEAD
附魔:亡灵杀手
原文:
Increases damage against undead targets
|
static Enchantment |
Enchantment.DEPTH_STRIDER
附魔:海底漫步
原文:
Increases walking speed while in water
|
static Enchantment |
Enchantment.DIG_SPEED
附魔:效率
原文:
Increases the rate at which you mine/dig
|
static Enchantment |
Enchantment.DURABILITY
附魔:耐久
原文:
Decreases the rate at which a tool looses durability
|
static Enchantment |
Enchantment.FIRE_ASPECT
附魔:火焰附加
原文:
When attacking a target, has a chance to set them on fire
|
static Enchantment |
Enchantment.FROST_WALKER
附魔:冰霜行者
原文:Freezes any still water adjacent to ice / frost which player is walking on
|
static Enchantment |
Enchantment.KNOCKBACK
附魔:击退
原文:
All damage to other targets will knock them back when hit
|
static Enchantment |
Enchantment.LOOT_BONUS_BLOCKS
附魔:时运
原文:
Provides a chance of gaining extra loot when destroying blocks
|
static Enchantment |
Enchantment.LOOT_BONUS_MOBS
附魔:抢夺
原文:
Provides a chance of gaining extra loot when killing monsters
|
static Enchantment |
Enchantment.LUCK
附魔:海之眷顾 (钓鱼杆)
原文:
Decreases odds of catching worthless junk
|
static Enchantment |
Enchantment.LURE
附魔:诱饵 (钓鱼杆)
原文:
Increases rate of fish biting your hook
|
static Enchantment |
Enchantment.MENDING
附魔:经验修补
原文:Allows mending the item using experience orbs
|
static Enchantment |
Enchantment.OXYGEN
附魔:水肺
原文:
Decreases the rate of air loss whilst underwater
|
static Enchantment |
Enchantment.PROTECTION_ENVIRONMENTAL
附魔:保护
原文:
Provides protection against environmental damage
|
static Enchantment |
Enchantment.PROTECTION_EXPLOSIONS
附魔:爆炸保护
原文:
Provides protection against explosive damage
|
static Enchantment |
Enchantment.PROTECTION_FALL
附魔:摔落保护
原文:
Provides protection against fall damage
|
static Enchantment |
Enchantment.PROTECTION_FIRE
附魔:火焰保护
原文:
Provides protection against fire damage
|
static Enchantment |
Enchantment.PROTECTION_PROJECTILE
附魔:抛射物保护
原文:
Provides protection against projectile damage
|
static Enchantment |
Enchantment.SILK_TOUCH
附魔:精准采集
原文:
Allows blocks to drop themselves instead of fragments (for example,
stone instead of cobblestone)
|
static Enchantment |
Enchantment.SWEEPING_EDGE
Increases damage against targets when using a sweep attack
|
static Enchantment |
Enchantment.THORNS
附魔:荆棘
原文:
Damages the attacker
|
static Enchantment |
Enchantment.VANISHING_CURSE
Item disappears instead of dropping
|
static Enchantment |
Enchantment.WATER_WORKER
附魔:水下速掘
原文:
Increases the speed at which a player may mine underwater
|
限定符和类型 | 方法和说明 |
---|---|
static Enchantment |
Enchantment.getById(int id)
已过时。
魔法值
|
static Enchantment |
Enchantment.getByName(java.lang.String name)
获取附魔的指定名称.
|
Enchantment |
EnchantmentWrapper.getEnchantment()
得到这个包装类所对应的的附魔.
|
Enchantment |
EnchantmentOffer.getEnchantment()
Get the type of the enchantment.
|
static Enchantment[] |
Enchantment.values()
得到所有已经注册了的附魔(
Enchantment s). |
限定符和类型 | 方法和说明 |
---|---|
boolean |
EnchantmentWrapper.conflictsWith(Enchantment other) |
abstract boolean |
Enchantment.conflictsWith(Enchantment other)
检查这个附魔是否与另外的附魔冲突.
|
static void |
Enchantment.registerEnchantment(Enchantment enchantment)
注册一个附魔的ID和对象.
|
void |
EnchantmentOffer.setEnchantment(Enchantment enchantment)
Sets the type of the enchantment.
|
构造器和说明 |
---|
EnchantmentOffer(Enchantment enchantment,
int enchantmentLevel,
int cost) |
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<Enchantment,java.lang.Integer> |
EnchantItemEvent.getEnchantsToAdd()
获取被加到物品中的附魔的Map (等级, 附魔种类)(若要修改请直接修改Map) .
|
构造器和说明 |
---|
EnchantItemEvent(Player enchanter,
InventoryView view,
Block table,
ItemStack item,
int level,
java.util.Map<Enchantment,java.lang.Integer> enchants,
int i) |
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<Enchantment,java.lang.Integer> |
ItemStack.getEnchantments()
获取该物品的所有附魔以及对应的附魔等级, 用map表示.
|
限定符和类型 | 方法和说明 |
---|---|
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(java.util.Map<Enchantment,java.lang.Integer> enchantments)
向物品堆添加附魔.
|
void |
ItemStack.addUnsafeEnchantments(java.util.Map<Enchantment,java.lang.Integer> enchantments)
以不安全的方式向物品堆添加附魔.
|
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<Enchantment,java.lang.Integer> |
ItemMeta.getEnchants()
Returns a copy the enchantments in this ItemMeta.
|
java.util.Map<Enchantment,java.lang.Integer> |
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.
|