本文整理匯總了Java中org.bukkit.enchantments.Enchantment.DAMAGE_ALL屬性的典型用法代碼示例。如果您正苦於以下問題:Java Enchantment.DAMAGE_ALL屬性的具體用法?Java Enchantment.DAMAGE_ALL怎麽用?Java Enchantment.DAMAGE_ALL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.bukkit.enchantments.Enchantment
的用法示例。
在下文中一共展示了Enchantment.DAMAGE_ALL屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getEnchant
private static Enchantment getEnchant(String enchant) {
switch (enchant.toLowerCase()) {
case "protection": return Enchantment.PROTECTION_ENVIRONMENTAL;
case "projectileprotection": return Enchantment.PROTECTION_PROJECTILE;
case "fireprotection": return Enchantment.PROTECTION_FIRE;
case "featherfall": return Enchantment.PROTECTION_FALL;
case "blastprotection": return Enchantment.PROTECTION_EXPLOSIONS;
case "respiration": return Enchantment.OXYGEN;
case "aquaaffinity": return Enchantment.WATER_WORKER;
case "sharpness": return Enchantment.DAMAGE_ALL;
case "smite": return Enchantment.DAMAGE_UNDEAD;
case "baneofarthropods": return Enchantment.DAMAGE_ARTHROPODS;
case "knockback": return Enchantment.KNOCKBACK;
case "fireaspect": return Enchantment.FIRE_ASPECT;
case "depthstrider": return Enchantment.DEPTH_STRIDER;
case "looting": return Enchantment.LOOT_BONUS_MOBS;
case "power": return Enchantment.ARROW_DAMAGE;
case "punch": return Enchantment.ARROW_KNOCKBACK;
case "flame": return Enchantment.ARROW_FIRE;
case "infinity": return Enchantment.ARROW_INFINITE;
case "efficiency": return Enchantment.DIG_SPEED;
case "silktouch": return Enchantment.SILK_TOUCH;
case "unbreaking": return Enchantment.DURABILITY;
case "fortune": return Enchantment.LOOT_BONUS_BLOCKS;
case "luckofthesea": return Enchantment.LUCK;
case "luck": return Enchantment.LUCK;
case "lure": return Enchantment.LURE;
case "thorns": return Enchantment.THORNS;
default: return null;
}
}