Fix CraftMagicNumbers for <@142383204895162369>

This commit is contained in:
libraryaddict 2021-06-29 13:21:27 +12:00
parent 14d6fc7257
commit 3ac88ba078

View File

@ -1337,7 +1337,7 @@ public class ReflectionManager {
public static Material getMaterial(String name) { public static Material getMaterial(String name) {
try { try {
if (!NmsVersion.v1_13.isSupported()) { 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); Object instance = toMinecraft.getDeclaringClass().getField("INSTANCE").get(null);
@ -1372,7 +1372,7 @@ public class ReflectionManager {
public static String getItemName(Material material) { public static String getItemName(Material material) {
try { 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) { if (item == null) {
return null; return null;