Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isSpecialItem(Material material, String name, ItemStack itemStack) {
- if (itemStack == null) {
- return false;
- }
- if (!itemStack.getType().equals(material)) {
- return false;
- }
- if (itemStack.getEnchantments().getOrDefault(Enchantment.DURABILITY, -1) != 10) {
- return false;
- }
- return itemStack.hasItemMeta() && itemStack.getItemMeta().hasDisplayName() && itemStack.getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.translateAlternateColorCodes('&', name));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement