summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java4
1 files changed, 2 insertions, 2 deletions
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 d68fe947..882e39be 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 <N extends Enum<N> & INamable> N toNMS(Enum<?> bukkit, Class<N> nms) {
Enum<?> converted;
- BiMap<Enum<?>, Enum<?>> nmsToBukkit = classMappings.get(nms.getClass());
+ BiMap<Enum<?>, 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);