Fix the items doing the wrong classes for the getters

This commit is contained in:
Andrew 2013-11-19 05:50:31 +13:00
parent 5006dc4f32
commit d09d7d6549

View File

@ -103,7 +103,7 @@ public class ReflectionManager {
public static Object getNmsItem(ItemStack itemstack) { public static Object getNmsItem(ItemStack itemstack) {
try { try {
return itemClass.getMethod("asNMSCopy", getNmsClass("ItemStack")).invoke(null, itemstack); return itemClass.getMethod("asNMSCopy", ItemStack.class).invoke(null, itemstack);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -112,7 +112,7 @@ public class ReflectionManager {
public static ItemStack getBukkitItem(Object nmsItem) { public static ItemStack getBukkitItem(Object nmsItem) {
try { try {
return (ItemStack) itemClass.getMethod("asBukkitCopy", ItemStack.class).invoke(null, nmsItem); return (ItemStack) itemClass.getMethod("asBukkitCopy", getNmsClass("ItemStack")).invoke(null, nmsItem);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }