You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/paper/dev/api/pdc.mdx
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,14 @@ container.set(key, new UUIDDataType(), uuid);
164
164
165
165
## Storing on different objects
166
166
167
+
:::caution
168
+
169
+
Data is **not** copied across holders for you, and needs to be **manually** copied if 'moving' between PersistentDataHolders.
170
+
171
+
E.g. Placing an ItemStack as a Block (with a TileState) ***does not*** copy over PDC data.
172
+
173
+
:::
174
+
167
175
Objects that can have a PDC implement the <Javadocname={"org.bukkit.persistence.PersistentDataHolder"}>`PersistentDataHolder`</Javadoc> interface
168
176
and their PDC can be fetched with <Javadocname={"org.bukkit.persistence.PersistentDataHolder#getPersistentDataContainer()"}>`PersistentDataHolder#getPersistentDataContainer()`</Javadoc>.
169
177
@@ -174,7 +182,7 @@ and their PDC can be fetched with <Javadoc name={"org.bukkit.persistence.Persist
0 commit comments