开发者ID:SamaGames,项目名称:Hub,代码行数:15,代码来源:PlayerProtectionListener.java 示例3: onCraftItem ▲点赞 2▼ @EventHandler(priority = EventPriority.HIGH)publicvoidonCraftItem(CraftItemEvent event){if( event.getRecipe().getResult().getType() == Material.STONE_SWORD || event.getRecipe()....
staticbooleanisTool(ItemStack item){if(item ==null)returnfalse;finalMaterial material = item.getType();// shearsif(material == Material.SHEARS)returntrue;// wood toolsif(material == Material.WOOD_SWORD || material == Material.WOOD_AXE || material == Material.WOOD_HOE || material == Mater...
Leaving its primary function (chopping wood) aside, the diamond axe can compete with other weapons in-game too. Due to its sharpness, a diamond axe is a pretty reliable combat weapon. In fact,it is more powerful than a Netherite swordin Minecraft Java edition and as good as an iron sword...
In Minecraft, a diamond has the following Name, ID and DataValue: Definitions Descriptionis what the item is called and (Minecraft ID Name) is the string value that is used ingame commands. Data Value(or damage value) identifies the variation of the block if more than one type exists for...
加入Gitee 与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :) 免费加入 已有帐号?立即登录 文件 master 克隆/下载 git config --global user.name userName git config --global user.email userEmail 内容可能含有违规信息
在下文中一共展示了Material.DIAMOND_AXE属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。 示例1: onDamage ▲点赞 3▼ @EventHandlerpublicvoidonDamage(EntityDamageByEntityEvent event){if((event.getDamager()instance...
(priority = EventPriority.HIGH)publicvoidonCraftItem(CraftItemEvent event){if( event.getRecipe().getResult().getType() == Material.STONE_SWORD || event.getRecipe().getResult().getType() == Material.IRON_SWORD || event.getRecipe().getResult().getType() == Material.GOLD_SWORD ...
ItemStack sword =newItemStack(Material.DIAMOND_SWORD,1); ItemMeta swordMeta = sword.getItemMeta(); sword.addUnsafeEnchantment(Enchantment.DAMAGE_ALL, sharpness); sword.addUnsafeEnchantment(Enchantment.DURABILITY, unbreaking); swordMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&',"&4&lTitanium...
在下文中一共展示了Material.DIAMOND_SPADE屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。 示例1: onDamage ▲點讚 3▼ @EventHandlerpublicvoidonDamage(EntityDamageByEntityEvent event){if((event.getDamager()instance...