Skip to content

Commit 2f8f228

Browse files
Strokkur424zlataovceLulu13022002
authored
feat(paper): document CLI arguments (#734)
Co-authored-by: Matouš Kučera <mk@kcra.me> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
1 parent a79c678 commit 2f8f228

2 files changed

Lines changed: 131 additions & 0 deletions

File tree

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export default defineConfig({
151151
"paper/reference/paper-plugins",
152152
"paper/reference/commands",
153153
"paper/reference/system-properties",
154+
"paper/reference/cli-arguments",
154155
"paper/reference/permissions",
155156
],
156157
},
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: CLI Arguments
3+
slug: paper/reference/cli-arguments
4+
description: Reference for all CLI arguments Paper recognizes.
5+
version: 1.21.11
6+
tableOfContents: false
7+
---
8+
9+
Paper provides CLI arguments you can set to configure certain behavior. CLI arguments are always added directly
10+
**after** the server file name when starting the server. For example:
11+
```bash
12+
java -jar server.jar --nogui
13+
```
14+
15+
`--nogui` is referred to as a CLI argument (more specifically, as it has no value, a **flag**).
16+
This page acts as a reference to all arguments Paper provides.
17+
18+
Some of these options are direct counterparts to settings you can modify in the `server.properties` file.
19+
The CLI arguments always **override** those set in the `server.properties` file.
20+
21+
##### `-?, --help`
22+
Prints a help message with all CLI arguments you may pass. Using this flag will not start the server.
23+
24+
##### `-C, --commands-settings <commands yml file>`
25+
The path towards the command settings file. Defaults to `commands.yml`.
26+
27+
##### `-P, --plugins <plugin directory>`
28+
The directory to look in for plugin JARs. Defaults to `plugins`.
29+
30+
##### `-S, --spigot-settings <yml file>`
31+
The path towards the Spigot configuration file. Defaults to `spigot.yml`.
32+
33+
##### `-W, --universe, --world-container, --world-dir <world directory>`
34+
The folder to put other world folders into. Defaults to `.` (this folder).
35+
36+
##### `--add-extra-plugin-dir, --add-plugin-dir <directory>`
37+
Additional directory to look for plugin files in. May be specified multiple times for more than one
38+
extra plugin directory.
39+
40+
##### `--add-extra-plugin-jar, --add-plugin <jar file>`
41+
Additional plugin JAR file to load. May be specified multiple times for multiple plugin JARs.
42+
43+
##### `-b, --bukkit-settings <yml file>`
44+
The path towards the Bukkit configuration file. Defaults to `bukkit.yml`.
45+
46+
##### `-c, --config <properties file>`
47+
The path towards the Minecraft server properties file. Defaults to `server.properties`.
48+
49+
##### `--demo`
50+
Whether to load the server in demo mode. This results in always the same world being generated and additional
51+
demo reminders and help messages being sent.
52+
53+
##### `--bonusChest`
54+
Whether to create a bonus chest on initial world creation.
55+
56+
##### `--eraseCache`
57+
Whether to force cache erase during world upgrades. This removes data such as heightmap and light data,
58+
which may be useful if you want to force recalculate those.
59+
60+
##### `--forceUpgrade`
61+
Whether to force a full world upgrade on server start.
62+
63+
:::danger[Warning]
64+
65+
This setting should rarely ever be used. The upgrade system in Paper is fast enough to do
66+
upgrades gradually as you play.
67+
68+
:::
69+
70+
##### `-h, --host, --server-ip <hostname or ip>`
71+
The host to listen on.
72+
73+
##### `--initSettings`
74+
Whether to only create setting files and then shut down the server before creating any worlds. This is useful
75+
if you want to first set some configuration values, which may be relevant during world creation.
76+
77+
##### `--jfrProfile`
78+
Whether to enable JFR (Java Flight Recorder) profiling.
79+
80+
##### `--noconsole`
81+
Disables the console.
82+
83+
##### `--nogui`
84+
Disables the graphical interface.
85+
86+
##### `--nojline`
87+
Disables JLine and emulates the Vanilla console.
88+
89+
##### `-o, --online-mode <true|false>`
90+
Whether to use online authentication.
91+
92+
##### `-p, --port, --server-port <port>`
93+
The port to listen on.
94+
95+
##### `--paper, --paper-settings <yml file>`
96+
The legacy Paper settings file path. Defaults to `paper.yml`.
97+
98+
:::danger[Warning]
99+
100+
This option is only used to migrate the legacy configuration file to the new format
101+
and should not be used for new servers.
102+
103+
:::
104+
105+
##### `--paper-dir, --paper-settings-directory <config directory>`
106+
Path to the Paper settings directory. Defaults to `config`.
107+
108+
##### `--pidFile <path>`
109+
Path to the PID file.
110+
111+
##### `--recreateRegionFiles`
112+
Whether to recreate region files during world upgrades.
113+
114+
##### `-s, --max-players, --size <value>`
115+
The maximum amount of players.
116+
117+
##### `--safeMode`
118+
Loads worlds only with the Vanilla datapack enabled.
119+
120+
##### `--server-name <name>`
121+
The name of the server. Defaults to `Unknown Server`.
122+
123+
##### `--serverId <id>`
124+
Sets the server identifier, which is used in crash files.
125+
126+
##### `-v, --version`
127+
Prints the CraftBukkit version. This option prevents the server from starting.
128+
129+
##### `-w, --level-name, --world <name>`
130+
Sets the world name.

0 commit comments

Comments
 (0)