forked from LogBlock/LogBlock
Fix itemstack reflection
This commit is contained in:
@ -781,7 +781,7 @@ public class BukkitUtils {
|
|||||||
Method asNMSCopyMethod = craftItemStackClazz.getMethod("asNMSCopy", ItemStack.class);
|
Method asNMSCopyMethod = craftItemStackClazz.getMethod("asNMSCopy", ItemStack.class);
|
||||||
|
|
||||||
Class<?> nmsItemStackClazz = ReflectionUtil.getMinecraftClass("world.item.ItemStack");
|
Class<?> nmsItemStackClazz = ReflectionUtil.getMinecraftClass("world.item.ItemStack");
|
||||||
Method getTagMethod = nmsItemStackClazz.getMethod("getTag");
|
Method getTagMethod = nmsItemStackClazz.getMethod("getTagClone");
|
||||||
|
|
||||||
Object nmsItemStack = asNMSCopyMethod.invoke(null, itemStack);
|
Object nmsItemStack = asNMSCopyMethod.invoke(null, itemStack);
|
||||||
Object itemTag = getTagMethod.invoke(nmsItemStack);
|
Object itemTag = getTagMethod.invoke(nmsItemStack);
|
||||||
|
Reference in New Issue
Block a user