1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-01 15:03:36 +01:00

Lets check for null name

This commit is contained in:
Zrips 2018-08-20 17:01:11 +03:00
parent d8eaa14b4f
commit 1a6f1d719c

View File

@ -66,10 +66,12 @@ public class ItemManager {
} }
byBukkitName.put(one.name().toLowerCase().replace("_", "").replace(" ", ""), cm); byBukkitName.put(one.name().toLowerCase().replace("_", "").replace(" ", ""), cm);
if (mojangName != null) {
String n = mojangName.toLowerCase().replace("_", "").replace(" ", "").replace("minecraft:", ""); String n = mojangName.toLowerCase().replace("_", "").replace(" ", "").replace("minecraft:", "");
if (!byMojangName.containsKey(n)) if (!byMojangName.containsKey(n))
byMojangName.put(n, cm); byMojangName.put(n, cm);
}
byMaterial.put(one, cm); byMaterial.put(one, cm);
if (!byId.containsKey(id)) if (!byId.containsKey(id))
byId.put(id, cm); byId.put(id, cm);
@ -2297,7 +2299,7 @@ public class ItemManager {
} }
} }
private static SlabType checkSlab(Block block) throws NoClassDefFoundError { private static SlabType checkSlab(Block block) {
if (!CMIMaterial.isSlab(block.getType())) if (!CMIMaterial.isSlab(block.getType()))
return SlabType.NOTSLAB; return SlabType.NOTSLAB;