当前位置: 首页>>代码示例>>Java>>正文


Java Enchantment.ARROW_INFINITE属性代码示例

本文整理汇总了Java中org.bukkit.enchantments.Enchantment.ARROW_INFINITE属性的典型用法代码示例。如果您正苦于以下问题:Java Enchantment.ARROW_INFINITE属性的具体用法?Java Enchantment.ARROW_INFINITE怎么用?Java Enchantment.ARROW_INFINITE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.bukkit.enchantments.Enchantment的用法示例。


在下文中一共展示了Enchantment.ARROW_INFINITE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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

示例2: getEnchantment

private Enchantment getEnchantment(String enchantment) {
    try {
        return Enchantment.getByName(enchantment);
    } catch (NullPointerException e) {
        Log.log(Log.Level.WARNING, "El encantamiento no existe");
        return Enchantment.ARROW_INFINITE;
    }
}
 
开发者ID:cadox8,项目名称:PA,代码行数:8,代码来源:EnchantCMD.java


注:本文中的org.bukkit.enchantments.Enchantment.ARROW_INFINITE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。