Skip to content

Commit 82447b4

Browse files
committed
fix: ItemStack roadmap
1 parent a2e2c83 commit 82447b4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ is intended to document any future API changes that are planned or possible depr
1313
### Interface `ItemStack`s
1414

1515
When you create `ItemStack`s using the constructor, you create an API representation of an [`ItemStack`](jd:paper:org.bukkit.inventory.ItemStack).
16-
However, there are also places where you can obtain an `ItemStack` that is backed by a NMS object instead.
17-
This can lead to inconsistencies and unnecessary upkeep, since we need to maintain our own `ItemStack` implementation and also
18-
support the NMS-backed object using ugly methods due to it not being a plain interface.
16+
This is an object that delegates to a NMS-backed object, you should instead use [`ItemStack#of`](jd:paper:org.bukkit.inventory.ItemStack#of(org.bukkit.Material)) to get the NMS-backed object directly.
1917

20-
Currently, the API `ItemStack` always delegates to a NMS-backed `CraftItemStack`, however in the future,
21-
`ItemStack` will be converted to an interface that allows developers to use an underlying `ItemStack` directly,
22-
instead of going through the API implementation.
18+
In the future, `ItemStack` will be converted to an interface and the constructor will be removed.
2319

2420
#### Precautions
2521

0 commit comments

Comments
 (0)