Skip to content

Commit

Permalink
Fixed casting issues with converting item stacks to nbt in 1.18 (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Feb 18, 2022
1 parent e8ade2a commit 3a02a7f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -41,7 +41,7 @@ public CompoundTag getNBTTag(org.bukkit.inventory.ItemStack bukkitStack) {
@Override
public CompoundTag convertToNBT(org.bukkit.inventory.ItemStack bukkitItem) {
ItemStack itemStack = new ItemStack(CraftItemStack.asNMSCopy(bukkitItem));
return CompoundTag.fromNBT(itemStack.save(new NBTTagCompound()));
return CompoundTag.fromNBT(itemStack.save(new NBTTagCompound()).getHandle());
}

@Override
Expand Down

0 comments on commit 3a02a7f

Please sign in to comment.