Skip to content

Commit 9ef710b

Browse files
committed
feat: document the /paper command
1 parent 677fb3c commit 9ef710b

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export default defineConfig({
139139
],
140140
},
141141
"paper/reference/paper-plugins",
142+
"paper/reference/paper-command",
142143
"paper/reference/system-properties",
143144
"paper/reference/permissions",
144145
],
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: The Paper command
3+
slug: paper/reference/paper-command
4+
description: Documentation about the /paper command and its subcommands.
5+
version: 1.21.8
6+
---
7+
8+
This page explains the subcommands of the in-game `/paper` command.
9+
10+
## chunkinfo
11+
The `/paper chunkinfo [<worldname>]` command is used for displaying information about loaded chunks in a world.
12+
You can specify the world to get info about with the `[<worldname>]` argument. If you set it to `*` or leave it
13+
out, it will list information for all worlds.
14+
15+
The output differentiates between multiple types of loaded chunks. Here is a quick rundown of each type.
16+
A more complete documentation may be found in the [Minecraft wiki](https://minecraft.wiki/w/Chunk).
17+
18+
- `Total` As the name suggests, this number describes **all chunks** currently loaded.
19+
- `Inactive` More commonly referred to as "inaccessible", are chunks which are not ticked, but where chunk generation occurs.
20+
- `Full` Usually called **border chunks**. No ticking is happening, but entities and blocks are loaded and accessible.
21+
- `Block Ticking` All game aspects work as expected, except that entities are not spawned naturally or ticked, but still accessible. Also called **lazy chunks**.
22+
- `Entity Ticking` The chunk is being ticked fully.
23+
24+
## debug
25+
The `/paper debug <chunks>` command is used to dump information about all currently loaded chunks to a file. The content
26+
of this file is generally irrelevant for most server admins and is intended to be used by developers.
27+
28+
## dumpitem
29+
The `/paper dumpitem [all]` command can be used to retrieve the data component representation of your currently held
30+
item. Simply running `/paper dumpitem` will yield the item data, which you can use to represent this item in
31+
commands which expect an item argument. `/paper dumpitem all` yields the **full data component representation**,
32+
including default data components you do not have to explicitly declare.
33+
34+
## dumplisteners
35+
The `/paper dumplisteners toFile|<className>` command is primarily intended for developers trying to figure out why
36+
their event handlers might not be working as expected. Using `/paper dumplisteners toFile` will write all
37+
currently registered event handlers to a file, whilst `/paper dumplisteners <className>` will print the registered
38+
event handlers only for the specific event.
39+
40+
## dumpplugins
41+
The `/paper dumpplugins` command is intended for developers trying to figure out issues with their dependencies or
42+
loading order in relation to other plugins. It can also be used to debug bootstrapper providers, general load order,
43+
and listing class loaders for the plugins.
44+
45+
## entity
46+
The `/paper entity list [<filter>] [<world>]` command can be used to list all currently ticking entities.
47+
48+
The `[<filter>]` argument is used to filter the listed entities types and acts similar to a **regular expression**:
49+
- You can use `*` to list **all** entities, which is the default value for this argument.
50+
- You can list individual entities by providing `minecraft:<entity_type>` as the argument. The namespace here is very important.
51+
- To list multiple entities, you can use the `*` as a greedy wildcard expression. For example, to list all entities,
52+
whose names start with **e**, you could use `minecraft:e*`.
53+
- You can also use the `?` single-character wildcard expression. For example, to list `pig` and `piglin`, but **not**
54+
`piglin_brute`, you can provide `minecraft:pig???` as the filter.
55+
56+
The `[<world>]` argument declares the world you want to check the entities in. This defaults to the current world
57+
of a player or to the overworld for the console.
58+
59+
The output will look similar to this:
60+
61+
```
62+
Total Ticking: -78, Total Non-Ticking: 92
63+
10 (3) : minecraft:pig
64+
1 (0) : minecraft:piglin
65+
* First number is ticking entities, second number is non-ticking entities
66+
```
67+
68+
The comment at the end already clearly describes the purpose of the numbers.
69+
70+
## fixlight
71+
The `/paper fixlight` command is a simple command to trigger a full re-calculation of the light map of all currently
72+
loaded chunks. This can be used to fix any lighting issues which commonly occur with plugins like WorldEdit.
73+
74+
## heap
75+
The `/paper heap` is a developer debug command to dump the current JVM heap to a `.hprof` file, which can be analyzed
76+
to detect to amount of memory used by certain objects. The output file can be rather big, so having a bit of free
77+
space on your disk is recommended before running this command (as a general rule, the file is usually smaller
78+
than the currently used memory. You can check the memory consumption using the `/spark healthreport` command).
79+
80+
## holderinfo
81+
The `/paper holderinfo [<world>]` command is used to gather the number of different chunks currently held in memory.
82+
83+
The `[<world>]` argument can be used to define the world to get the chunk holder information for. Leave blank to
84+
default to `*`, which prints the information for all chunks.
85+
86+
In general, the types have the following meanings:
87+
- `Total` The total amount of in-memory chunk holders.
88+
- `Unloadable` The number of chunks that are safe to be unloaded.
89+
- `Null` Chunks, which have received the unload signal, but whose scheduling locks are still held.
90+
- `ReadOnly` The number of chunk holders, which are readable, but not writable to.
91+
- `Proto` A "prototype" chunk, which is a fully working chunk loaded in memory, but which is not currently placed in the world.
92+
- `Full` Represents the number of chunks currently placed in the world.
93+
94+
## mobcaps
95+
Not to be confused with the [playermobcaps](#playermobcaps) subcommand, the `/paper mobcaps [<world>]` command displays
96+
the **global** mob caps for all players in a world. The `[<world>]` argument defaults to the overworld and
97+
can be set to retrieve the mob caps for other worlds as well. The command also lists the number of
98+
chunks in which mobs can spawn.
99+
100+
## playermobcaps
101+
The `/paper playermobcaps [<player>]` command is used to list the local mob caps for a specific player. The `[<player>]`
102+
argument defaults to the player, who ran the command, if one exists.
103+
104+
## reload
105+
The `/paper reload` command is an unsupported command which allows for runtime Paper-config reloading. If you get any issues
106+
after using this command, please make sure to reproduce this on a freshly-started server before asking for help or
107+
reporting it. Do not that this command **does not** reload non-Paper configs, like the `spigot.yml`.
108+
109+
## syncloadinfo
110+
The `/paper syncloadinfo [clear]` command requires the `-Dpaper.debug-sync-loads=true` JVM flag to be explicitly set
111+
before running the command. The command was historically used for debugging purposes during Paper development, but
112+
the mechanism behind the command is currently unused, meaning that the written file will **always** look
113+
like this:
114+
115+
```json
116+
{
117+
"worlds": []
118+
}
119+
```
120+
121+
Outside of checking for whether the command is allowed to be run, the JVM flag is otherwise unused.
122+
123+
## version
124+
The `/paper version` command is an alias to the standard `/version` command.

0 commit comments

Comments
 (0)