mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-10 10:41:00 +00:00
Add jarfile options and custom worlds directory path (Multiverse) to docs (#1527)
This commit is contained in:
1 parent
3e3abda71e
commit
e7236212d8
1 file changed
+12
@@ -834,6 +834,14 @@ The following diagram shows how this option can be used in a compose deployment
|
|||||||
### Overwrite world on start
|
### Overwrite world on start
|
||||||
The world will only be downloaded or copied if it doesn't exist already. Set `FORCE_WORLD_COPY=TRUE` to force overwrite the world on every server start.
|
The world will only be downloaded or copied if it doesn't exist already. Set `FORCE_WORLD_COPY=TRUE` to force overwrite the world on every server start.
|
||||||
|
|
||||||
|
### Custom worlds directory path
|
||||||
|
To set a custom worlds directory for the Multiverse plugin on a baremetal server, you'd pass the `--world-dir` argument after the jar file.
|
||||||
|
In order to accomplish the same in a containerized server, set the `EXTRA_ARGS` environment variable in your command line or docker compose yaml to the same argument string. For example:
|
||||||
|
```
|
||||||
|
docker run -d -e EXTRA_ARGS='--world-dir ./worlds/'
|
||||||
|
```
|
||||||
|
`--world-container`, `-W`, and `--universe` are aliases to `--world-dir` and can also be used.
|
||||||
|
|
||||||
### Datapacks
|
### Datapacks
|
||||||
Datapacks can be installed in a similar manner to mods/plugins. There are many environment variables which function in the same way they do for [mods](#working-with-mods-and-plugins):
|
Datapacks can be installed in a similar manner to mods/plugins. There are many environment variables which function in the same way they do for [mods](#working-with-mods-and-plugins):
|
||||||
* `DATAPACKS`
|
* `DATAPACKS`
|
||||||
@@ -1438,6 +1446,10 @@ environment variable. The JVM requires `-XX` options to precede `-X` options, so
|
|||||||
For some cases, if e.g. after removing mods, it could be necessary to startup minecraft with an additional `-D` parameter like `-Dfml.queryResult=confirm`. To address this you can use the environment variable `JVM_DD_OPTS`, which builds the params from a given list of values separated by space, but without the `-D` prefix. To make things running under systems (e.g. Plesk), which doesn't allow `=` inside values, a `:` (colon) could be used instead. The upper example would look like this:
|
For some cases, if e.g. after removing mods, it could be necessary to startup minecraft with an additional `-D` parameter like `-Dfml.queryResult=confirm`. To address this you can use the environment variable `JVM_DD_OPTS`, which builds the params from a given list of values separated by space, but without the `-D` prefix. To make things running under systems (e.g. Plesk), which doesn't allow `=` inside values, a `:` (colon) could be used instead. The upper example would look like this:
|
||||||
`JVM_DD_OPTS=fml.queryResult:confirm`, and will be converted to `-Dfml.queryResult=confirm`.
|
`JVM_DD_OPTS=fml.queryResult:confirm`, and will be converted to `-Dfml.queryResult=confirm`.
|
||||||
|
|
||||||
|
### Jarfile Options
|
||||||
|
Options that would usually be passed to the jar file (those which are written after the filename) can be passed via the `EXTRA_ARGS` environment variable.
|
||||||
|
See [Custom worlds directory path](#custom-worlds-directory-path) for an example.
|
||||||
|
|
||||||
### Interactive and Color Console
|
### Interactive and Color Console
|
||||||
|
|
||||||
If you would like to `docker attach` to the Minecraft server console with color and interactive capabilities, then add
|
If you would like to `docker attach` to the Minecraft server console with color and interactive capabilities, then add
|
||||||
|
|||||||
Reference in new issue
Block a user