Fix CraftMagicNumbers for <@142383204895162369>
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user