SteamWar/MissileWars
Archiviert
13
0
Dieser Commit ist enthalten in:
jojo 2020-09-06 18:33:43 +02:00
Ursprung 90bbbda198
Commit a7011030fa

Datei anzeigen

@ -51,8 +51,13 @@ public class Missile extends SpecialItem {
private final ItemStack item; private final ItemStack item;
private Missile(File missileFile){ private Missile(File missileFile){
String name = missileFile.getName().split("\\.")[0]; String[] strings = missileFile.getName().split("\\.");
Material itemType = Material.valueOf(missileFile.getName().split("\\.")[1]); 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); ClipboardFormat format = ClipboardFormats.findByFile(missileFile);