1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +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);
String n = mojangName.toLowerCase().replace("_", "").replace(" ", "").replace("minecraft:", "");
if (!byMojangName.containsKey(n))
byMojangName.put(n, cm);
if (mojangName != null) {
String n = mojangName.toLowerCase().replace("_", "").replace(" ", "").replace("minecraft:", "");
if (!byMojangName.containsKey(n))
byMojangName.put(n, cm);
}
byMaterial.put(one, cm);
if (!byId.containsKey(id))
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()))
return SlabType.NOTSLAB;