Skip to content

Commit

Permalink
Some documentation improvements #215
Browse files Browse the repository at this point in the history
  • Loading branch information
3arthqu4ke committed Dec 3, 2024
1 parent 9c3551e commit 85f2976
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ to test the game in your CI/CD pipeline with [mc-runtime-test](https://github.co
## How to use

1. Download the `headlessmc-launcher.jar` from the releases tab and install a Java version ≥ 8.
- If you want additional features such as plugins and launching the game inside the same JVM, use the `headlessmc-launcher-wrapper.jar` instead.
2. Run the launcher with `java -jar headlessmc-launcher.jar` in your terminal.
You can also use the `hmc.sh/bat` scripts for convenience.
3. You need to specify which Java installations HeadlessMc can use to run the game.
Expand Down Expand Up @@ -107,14 +108,16 @@ You can also achieve headless mode without patching lwjgl by running headlessmc
### Configuring HeadlessMc

HeadlessMc can be configured using properties. These can be passed as SystemProperties from the command line or via the
`HeadlessMc/config.properties` file. Additional configs can be added to the `HeadlessMc/configs` folder. For available
properties see the [HmcProperties](headlessmc-api/src/main/java/me/earth/headlessmc/api/config/HmcProperties.java), the
`HeadlessMc/config.properties` file.
For available properties see the [HmcProperties](headlessmc-api/src/main/java/me/earth/headlessmc/api/config/HmcProperties.java), the
[LauncherProperties](headlessmc-launcher/src/main/java/me/earth/headlessmc/launcher/LauncherProperties.java), the
[JLineProperties](headlessmc-jline/src/main/java/me/earth/headlessmc/jline/JLineProperties.java), the
[LoggingProperties](headlessmc-logging/src/main/java/me/earth/headlessmc/logging/LoggingProperties.java), the
[RuntimeProperties](headlessmc-runtime/src/main/java/me/earth/headlessmc/runtime/RuntimeProperties.java) or the
[LwjglProperties](headlessmc-lwjgl/src/main/java/me/earth/headlessmc/lwjgl/LwjglProperties.java).

You can e.g. set `hmc.gamedir` to run the game inside another directory.

### A Note on command arguments

Arguments passed to commands have to be separated using spaces. If you want to pass an Argument which contains spaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static void runHeadlessMc(ExitManager exitManager, String... args) throw
builder.initLogging();
AbstractLoginCommand.replaceLogger();
if (Main.class.getClassLoader() == ClassLoader.getSystemClassLoader()) {
log.warn("You are not running from headlessmc-launcher-wrapper. Some things will not work properly!");
log.warn("Not running from the headlessmc-launcher-wrapper. No plugin support and in-memory launching.");
}

Launcher launcher = builder.buildDefault();
Expand Down

0 comments on commit 85f2976

Please sign in to comment.