當前位置: 首頁>>代碼示例>>Java>>正文


Java Enchantment.ARROW_KNOCKBACK屬性代碼示例

本文整理匯總了Java中org.bukkit.enchantments.Enchantment.ARROW_KNOCKBACK屬性的典型用法代碼示例。如果您正苦於以下問題:Java Enchantment.ARROW_KNOCKBACK屬性的具體用法?Java Enchantment.ARROW_KNOCKBACK怎麽用?Java Enchantment.ARROW_KNOCKBACK使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.bukkit.enchantments.Enchantment的用法示例。


在下文中一共展示了Enchantment.ARROW_KNOCKBACK屬性的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;	
	}
}
 
開發者ID:smessie,項目名稱:SkyWarsReloaded,代碼行數:31,代碼來源:ItemUtils.java


注:本文中的org.bukkit.enchantments.Enchantment.ARROW_KNOCKBACK屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。