From 3ac88ba07828856f6ca181400e236c1dd80115cf Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 29 Jun 2021 13:21:27 +1200 Subject: [PATCH] Fix CraftMagicNumbers for <@142383204895162369> --- .../disguise/utilities/reflection/ReflectionManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java b/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java index 19c68d39..a898b59e 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/reflection/ReflectionManager.java @@ -1337,7 +1337,7 @@ public class ReflectionManager { public static Material getMaterial(String name) { try { if (!NmsVersion.v1_13.isSupported()) { - Method toMinecraft = getCraftMethod("util.CraftMagicNumbers", "getMaterialFromInternalName", String.class); + Method toMinecraft = getCraftMethod("CraftMagicNumbers", "getMaterialFromInternalName", String.class); Object instance = toMinecraft.getDeclaringClass().getField("INSTANCE").get(null); @@ -1372,7 +1372,7 @@ public class ReflectionManager { public static String getItemName(Material material) { try { - Object item = getCraftMethod("util.CraftMagicNumbers", "getItem", Material.class).invoke(null, material); + Object item = getCraftMethod("CraftMagicNumbers", "getItem", Material.class).invoke(null, material); if (item == null) { return null;