SteamWar/SpigotCore
Archiviert
13
0

Add Item Legacy Support

Dieser Commit ist enthalten in:
Chaoscaot 2020-11-19 09:10:32 +01:00
Ursprung dbd0b4f4fe
Commit d99d378077

Datei anzeigen

@ -154,7 +154,11 @@ public class SWItem {
item = new SWItem(Material.valueOf(itemJson.get("material").getAsString()), itemJson.get("title").getAsString());
}
}catch (IllegalArgumentException e) {
item = new SWItem(Material.STONE, itemJson.get("title").getAsString());
try {
item = new SWItem(Material.valueOf(Material.LEGACY_PREFIX + itemJson.get("material").getAsString()), itemJson.get("title").getAsString());
}catch (IllegalArgumentException ex) {
item = new SWItem(Material.STONE, itemJson.get("title").getAsString());
}
}
if(itemJson.has("skullOwner")) {
item = SWItem.getPlayerSkull(itemJson.get("skullOwner").getAsString());