Skip to content

Commit 76e717a

Browse files
committed
fix: javadoc - need to specify consumer class
1 parent bb725f5 commit 76e717a

File tree

1 file changed

+3
-3
lines changed
  • src/content/docs/paper/dev/api

1 file changed

+3
-3
lines changed

src/content/docs/paper/dev/api/pdc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ item.editPersistentDataContainer(pdc -> {
6060

6161
:::note
6262

63-
The [`ItemStack#editPersistentDataContainer()`](jd:paper:org.bukkit.inventory.ItemStack#editPersistentDataContainer(Consumer)) method on `ItemStack` is only available in 1.21.4+. For older versions, you need to access and modify the `ItemMeta` instead.
64-
For 1.16.5+, there's the [`ItemStack#editMeta()`](jd:paper:org.bukkit.inventory.ItemStack#editMeta(Consumer)) method though.
63+
The [`ItemStack#editPersistentDataContainer()`](jd:paper:org.bukkit.inventory.ItemStack#editPersistentDataContainer(java.util.function.Consumer)) method on `ItemStack` is only available in 1.21.4+. For older versions, you need to access and modify the `ItemMeta` instead.
64+
For 1.16.5+, there's the [`ItemStack#editMeta()`](jd:paper:org.bukkit.inventory.ItemStack#editMeta(java.util.function.Consumer)) method though.
6565

6666
:::
6767

@@ -226,7 +226,7 @@ and their PDC can be fetched with [`PersistentDataHolder#getPersistentDataContai
226226
the `ItemStack`'s `ItemMeta`. This, however, includes the overhead of constructing the entire `ItemMeta`, which acts as a snapshot of the `ItemStack`'s data at the point of creation.
227227

228228
To avoid this overhead in 1.21.1+, ItemStack exposes a read-only view of its persistent data container at `ItemStack#getPersistentDataContainer()`.
229-
Edits to the persistent data container can also be simplified in 1.21.4+ using `ItemStack#editPersistentDataContainer(Consumer)`.
229+
Edits to the persistent data container can also be simplified in 1.21.4+ using `ItemStack#editPersistentDataContainer(java.util.function.Consumer)`.
230230
The persistent data container available in the consumer is not valid outside the consumer.
231231
```java
232232
ItemStack itemStack = ...;

0 commit comments

Comments
 (0)