Skip to content
Success

Changes

Summary

  1. #639: Deep clone itemmetas persistent container on clone (details)
Commit 6b00b14539bbfe4b32a93de4ce66856b71ba9d8f by md_5
#639: Deep clone itemmetas persistent container on clone

After this commit, spigot now creates a deep copy of the
itemmeta's persistent data container when the itemmeta
instance is cloned.

This change fixes the bug that, after cloning itemmeta, the container
instance the cloned meta would point to was equal to the original one.
This resulted in two itemmeta instances sharing a single persistent
container.
The file was modifiedsrc/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
The file was modifiedsrc/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java