From b5f1219807cd2f4674c3a8387ad020ac088d073d Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 26 Sep 2020 21:51:10 +0200 Subject: [PATCH] Remove special Tag --- src/de/steamwar/misslewars/items/Missile.java | 2 +- src/de/steamwar/misslewars/items/SpecialItem.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/misslewars/items/Missile.java b/src/de/steamwar/misslewars/items/Missile.java index 99e5e0d..2392aea 100644 --- a/src/de/steamwar/misslewars/items/Missile.java +++ b/src/de/steamwar/misslewars/items/Missile.java @@ -77,7 +77,7 @@ public class Missile extends SpecialItem { BlockTypeMask blockTypeMask = new BlockTypeMask(clipboard, BlockTypes.TNT); lore.add("§7TNT §8: §e" + e.countBlocks(clipboard.getRegion(), blockTypeMask)); - item = createItem(itemType, "§c" + name, 1, lore, false); + item = createItem(itemType, "§c" + name, 1, lore); } private void lore(List lore, String[] args, int index, String tag) { diff --git a/src/de/steamwar/misslewars/items/SpecialItem.java b/src/de/steamwar/misslewars/items/SpecialItem.java index 1ed1f91..b66c04c 100644 --- a/src/de/steamwar/misslewars/items/SpecialItem.java +++ b/src/de/steamwar/misslewars/items/SpecialItem.java @@ -42,10 +42,10 @@ public abstract class SpecialItem { public abstract boolean handleUse(Player p); public ItemStack createItem(Material material, String name, int amount) { - return createItem(material, name, amount, new ArrayList<>(), false); + return createItem(material, name, amount, new ArrayList<>()); } - public ItemStack createItem(Material material, String name, int amount, List lore, boolean special) { + public ItemStack createItem(Material material, String name, int amount, List lore) { ItemStack item = new ItemStack(material, amount); ItemMeta meta = item.getItemMeta(); assert meta != null; @@ -53,7 +53,6 @@ public abstract class SpecialItem { meta.setLore(lore); meta.setDisplayName(name); item.setItemMeta(meta); - if (special) item.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, 1); return item; }