Skip to content

Commit cf47a18

Browse files
committed
Update config page to account for the latest changes
1 parent 4f04c28 commit cf47a18

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/en/user-setup/config.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ create-dispatcher-json: false
5151
# current Minecraft version was found.
5252
fallback-to-latest-nms: true
5353

54+
# Skips the initial datapack reload when the server loads (default: true)
55+
# If "true", the CommandAPI will not reload datapacks when the server has finished
56+
# loading. Datapacks will still be reloaded if performed manually when "hook-paper-reload"
57+
# is set to "true" and /minecraft:reload is run.
58+
skip-initial-datapack-reload: true
59+
60+
# Hook into Paper's ServerResourcesReloadedEvent (default: false)
61+
# If "true", the CommandAPI will hook into Paper's ServerResourcesReloadedEvent to detect when
62+
# /minecraft:reload is run. This allows the CommandAPI to automatically call its custom datapack-reloading
63+
# function which allows CommandAPI commands to be used in datapacks.
64+
hook-paper-reload: false
65+
5466
# Plugins to convert (default: [])
5567
# Controls the list of plugins to process for command conversion.
5668
plugins-to-convert: []
@@ -243,14 +255,20 @@ fallback-to-latest-nms: false
243255
fallback-to-latest-nms: true
244256
```
245257

258+
</div>
259+
246260
### `skip-initial-datapack-reload`
247261

248262
Controls whether the CommandAPI should perform its initial datapack reload when the server has finished loading.
249263

250264
If set to `false`, the CommandAPI reloads all datapacks in a similar fashion to `/minecraft:reload` in order to propagate CommandAPI commands into datapack functions and tags. This operation may cause a slight delay to server startup and is not necessary if you aren’t using datapacks or functions that use CommandAPI commands.
251265

266+
<div class="paper">
267+
252268
Note that datapacks will still be reloaded if performed manually when `hook-paper-reload` is set to `true` and you run `/minecraft:reload`.
253269

270+
</div>
271+
254272
**Default value**
255273

256274
```yaml
@@ -263,6 +281,28 @@ skip-initial-datapack-reload: true
263281
skip-initial-datapack-reload: false
264282
```
265283

284+
<div class="paper">
285+
286+
### `hook-paper-reload`
287+
288+
Controls whether the CommandAPI hooks into the Paper-exclusive `ServerResourcesReloadedEvent` when available.
289+
290+
When the CommandAPI detects it is running on a Paper-based server, this config option controls if the CommandAPI hooks into the `ServerResourcesReloadedEvent`, which triggers when `/minecraft:reload` is run. During this event, the CommandAPI runs a custom datapack reloading sequence that helps commands registered with the CommandAPI work within datapacks. See [Reloading datapacks](../internal/internal.md#reloading-datapacks) for more information on this process.
291+
292+
By default, this value is set to `false` and the CommandAPI will not hook into the `ServerResourcesReloadedEvent`. If you want, you can set this to `true`, and the CommandAPI will hook into this event.
293+
294+
**Default value**
295+
296+
```yaml
297+
hook-paper-reload: false
298+
```
299+
300+
**Example value**
301+
302+
```yaml
303+
hook-paper-reload: true
304+
```
305+
266306
</div>
267307

268308
### `plugins-to-convert`

0 commit comments

Comments
 (0)