diff --git a/src/de/steamwar/misslewars/items/Missile.java b/src/de/steamwar/misslewars/items/Missile.java index 7df6130..da81e7f 100644 --- a/src/de/steamwar/misslewars/items/Missile.java +++ b/src/de/steamwar/misslewars/items/Missile.java @@ -51,8 +51,13 @@ public class Missile extends SpecialItem { private final ItemStack item; private Missile(File missileFile){ - String name = missileFile.getName().split("\\.")[0]; - Material itemType = Material.valueOf(missileFile.getName().split("\\.")[1]); + String[] strings = missileFile.getName().split("\\."); + String name = strings[0]; + String material = strings[1]; + if (!material.endsWith("_SPAWN_EGG")) { + material += "_SPAWN_EGG"; + } + Material itemType = Material.valueOf(material); ClipboardFormat format = ClipboardFormats.findByFile(missileFile);