Skip to content

Commit a35eddb

Browse files
committed
feat: propose/showcase a notice tag
1 parent f9fb390 commit a35eddb

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ item.editPersistentDataContainer(pdc -> {
5555
});
5656
```
5757

58-
:::note
59-
60-
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`](jd:paper:org.bukkit.inventory.meta.ItemMeta) instead.
61-
For 1.16.5+, there's the [`ItemStack#editMeta()`](jd:paper:org.bukkit.inventory.ItemStack#editMeta(java.util.function.Consumer)) method though.
58+
<details class="notice">
59+
<summary>Version Notice</summary>
6260

63-
:::
61+
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`](jd:paper:org.bukkit.inventory.meta.ItemMeta) instead.
62+
For 1.16.5+, there's the [`ItemStack#editMeta()`](jd:paper:org.bukkit.inventory.ItemStack#editMeta(java.util.function.Consumer)) method though.
63+
</details>
6464

6565
:::note
6666

@@ -208,11 +208,11 @@ String value = pdcView.getOrDefault(key, PersistentDataType.STRING, "<null>");
208208
player.sendPlainMessage(value);
209209
```
210210

211-
:::note
212-
213-
PDC-view support for `ItemStack` was only introduced in 1.21.1. For older versions, you need to use the `ItemMeta` instead.
211+
<details class="notice">
212+
<summary>Version Notice</summary>
214213

215-
:::
214+
PDC-view support for `ItemStack` was only introduced in 1.21.1. For older versions, you need to use the `ItemMeta` instead.
215+
</details>
216216

217217
## Storing on different objects
218218

src/styles/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,13 @@
102102
/* return to Starlight default */
103103
--sl-color-orange-low: hsl(var(--sl-hue-orange), 90%, 88%);
104104
}
105+
106+
.notice summary {
107+
padding: 0.45rem 0.6rem;
108+
border-radius: 6px;
109+
border-left: 4px solid var(--color-accent-6, #2563eb);
110+
background: var(--color-accent-2, #e8f4ff);
111+
}
112+
html[data-theme="dark"] details.notice summary {
113+
background: var(--color-accent-2, #0f1724);
114+
}

0 commit comments

Comments
 (0)