From ca75fead2c8217babd58b2a7e8d15d9886bf74ee Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 24 Jul 2018 12:04:34 +1000 Subject: [PATCH] SPIGOT-4131: Fix typo affecting setting BlockData --- .../org/bukkit/craftbukkit/block/data/CraftBlockData.java | 4 ++-- 1 file 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 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);