diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java index d68fe947df..882e39be33 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -138,7 +138,7 @@ public class CraftBlockData implements BlockData { @SuppressWarnings("unchecked") private static & INamable> N toNMS(Enum bukkit, Class nms) { Enum converted; - BiMap, Enum> nmsToBukkit = classMappings.get(nms.getClass()); + BiMap, Enum> nmsToBukkit = classMappings.get(nms); if (nmsToBukkit != null) { converted = nmsToBukkit.inverse().get(bukkit); @@ -157,7 +157,7 @@ public class CraftBlockData implements BlockData { if (nmsToBukkit == null) { nmsToBukkit = HashBiMap.create(); - classMappings.put(nms.getClass(), nmsToBukkit); + classMappings.put(nms, nmsToBukkit); } nmsToBukkit.put(converted, bukkit);