Skip to content

Commit a31e008

Browse files
authored
Add warnings about (un)registration after server load for Folia (#18)
1 parent a890ae2 commit a31e008

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/en/create-commands/registration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,9 @@ If you want your command to be accessible in Minecraft functions, make sure the
224224
</div>
225225

226226
The CommandAPI does support registering commands anytime after the server is done loading. Commands registered while the server is running _should_ work the same as commands registered in `onLoad()`/`onEnable()`.
227+
228+
:::warning
229+
230+
Registering commands after the server is done loading will _not_ work on Folia. Folia has currently disabled the `minecraft:reload` command, which is normally responsible for safely updating data packs. On Paper, the CommandAPI hooks into this functionality to update the list of commands the server provides. Folia does not support this, so the CommandAPI cannot register new commands after the server has started.
231+
232+
:::

docs/en/create-commands/unregistration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ Similarly, unregistrations are also handled in a lifecycle event which runs afte
110110

111111
</div>
112112

113+
:::warning
114+
115+
Unregistering commands after the server is done loading will _not_ work on Folia. Folia has currently disabled the `minecraft:reload` command, which is normally responsible for safely updating data packs. On Paper, the CommandAPI hooks into this functionality to update the list of commands the server provides. Folia does not support this, so the CommandAPI cannot remove commands after the server has started.
116+
117+
:::
118+
113119
## Unregistering a Bukkit command - `/version`
114120

115121
<div class="paper">

0 commit comments

Comments
 (0)