Skip to content

stjume/minecraft-server-setup

Repository files navigation

Minecraft Server Tooling

TL;DR

Automated tooling for starting and configuring a (local) Minecraft server under Windows with a custom set of gamerules and commands. Designed for Stiftung jugend und medien workshops.

Features

  • Automatic server startup with Java configuration
  • Automatic gamerule configuration and success validation from jume_gamerule.properties
  • Custom command execution from jume_custom_commands.txt
  • RCON-based configuration using mcrcon
  • Error handling with user-friendly error messages

How to Use

  1. Requirements: Ensure that all requirements are present (see Requirements)
  2. Configure: Specify the gamerules and commands you want to apply at startup in the provided configuration files.
  3. Start the server: Run Start.bat
  4. Wait for configuration: The script automatically waits for the server to start, then applies gamerules and custom commands
  5. Verify success: Look for [Rcon] jume Tooling: Everything is ready to go! in the server console or check the log file (jume_startup_log_*)

Configuration Files

  • jume_gamerule.properties: Define gamerules in rule=value format (one per line, # for comments)
  • jume_custom_commands.txt: Add custom server commands (one per line, without leading /, # for comments)

Requirements

Software

Tools

  • mcrcon.exe must be located at the location specified in MC_RCON_LOCATION in jume_configure_server.py (default: helpers/mcrcon.exe)
  • You can use our helper script jume_download_mcrcon.bat to download it

Server Configuration

It is assumed that the minecraft server .jar is called server.jar, if you want another name to be called you can change it in Start.bat.

The following settings must be present in server.properties:

enable-rcon=true
rcon.password=verySecurePasswordThatYouShouldntChange

This is already configured in the server.properties in this repository.

Note: The RCON password must match RCON_PASSWORD in jume_configure_server.py (default: verySecurePasswordThatYouShouldntChange).

Supported Versions

Note: Minecraft changed its gamerule naming scheme from camelCase to snake_case with the release of 1.21.11.
E.g.: keepInventory is now keep_inventory. You can have both versions configured in your jume_gamerule.properties, the wrongly-formatted ones will produce a warning in the output, but won't influence the success of other gamrules.

Tested (maybe incomplete)

  • 1.21.10
  • 1.21.11 (requires snake_case formatting)

About

Since Minecraft 1.21.10, PvP is no longer a setting in the server.properties instead it's a game rule.

PvP is prohibited in our workshops so we had to find a way to reliably disable it, every time a new world is set up.

This is why we developed this tooling for our internal use. During development, we decided to expand the scope from "just disabling pvp" to a wider, more general approach.

Since we're pretty happy and confident with our solution we decided to open source it and make it available for other institutions as well.

AI disclosure

  • The initial version of this readme was AI generated based on the projects files.
  • Some standard documentation of the python code was AI generated.
  • All AI-generated code and text was audited by the authors.
  • All other usages of AI are clearly disclosed as such in the related files.

About

Start a minecraft server with a custom set of predefined gamerules and commands set at startup.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors