BlueDragon's Minestom implementation. It currently includes:
- Creating isolated instances for different game types and modes
- A modular system for adding functionality to games
- This allows for a very high degree of code reusability and simplicity, and makes rapid prototyping of games very quick and easy.
- System for handling player punishments
- Database support linked to every
Playerusing a player provider - Synchronization with other servers using gRPC messaging and a Mongo database
- Routing players to the correct instance when they join
- Separated, per-instance chat and tablist functionality
- Basic commands
Minestom is a Minecraft server library targeted at developers. Their wiki is available here.
Build with ./gradlew installThinDist, then run it with:
java -cp "build/thin-dist/Server-dev.jar:build/thin-dist/lib/*" com.bluedragonmc.server.ServerKtRequires Java 25 or higher.
This can be built as a docker container with the following command:
$ DOCKER_BUILDKIT=1 docker build -t bluedragonmc/server:testing .This uses the Dockerfile in the current directory to build an image with the version string "testing".
Note: A game named Lobby must be present for the server to run!
Environment variables:
PUFFIN_VELOCITY_SECRET- Your Velocity proxy forwarding secret (optional). If not specified, Mojang authentication will be enabled.BLUEDRAGON_HEALTH_PORT- The port used for lifecycle endpoints (/health,/ready, and/drain). Defaults to8081.BLUEDRAGON_SHUTDOWN_COUNTDOWN_SECONDS- How long players are given before a draining server stops. Defaults to7200(2 hours).BLUEDRAGON_COUNTDOWN_HIDDEN_SECONDS- How long the shutdown countdown stays hidden at the start of a drain. Defaults to3600(1 hour). At least 60 seconds of the countdown is always visible.BLUEDRAGON_TICK_TIMEOUT_MS- The maximum time since the last tick before the server is considered unhealthy. Defaults to100.BLUEDRAGON_DRAIN_QUIESCENCE_MS- How long a draining server must remain empty before it stops early. Defaults to15000.BLUEDRAGON_LOBBY_TRANSFER_TIMEOUT_MS- How long to wait for players to be moved to a lobby when the drain completes before kicking them. Defaults to30000.BLUEDRAGON_LIFECYCLE_DISABLED- Disables the lifecycle HTTP endpoints if set to any value.BLUEDRAGON_ENV_TYPE- Set to "DEV" to enable development mode.BLUEDRAGON_QUEUE_TYPE- Set to "IPC" to use Puffin or "TEST" for theTestQueue. If not present, a default value is inferred.BLUEDRAGON_MONGO_CONNECTION_STRING- The connection string used to connect to MongoDB.BLUEDRAGON_PUFFIN_HOSTNAME- The hostname used to connect to Puffin.BLUEDRAGON_LUCKPERMS_HOSTNAME- The hostname used to connect to LuckPerms.BLUEDRAGON_SERVER_NAME- Overrides the server name. If unset,HOSTNAMEis used.HOSTNAME- Used to determine the server name. Provided by default in Docker or Kubernetes environments.SERVER_INSTANCE_MIN_INACTIVE_TIME- The amount of time that an instance must be inactive before it is cleaned up.SERVER_INSTANCE_CLEANUP_PERIOD- The amount of time in between instance cleanup tasks.BLUEDRAGON_PUFFIN_PORT- The port used to connect to Puffin. Defaults to50051.BLUEDRAGON_GRPC_SERVER_PORT- The port used to create a gRPC server. Defaults to50051.
Tip
If you are running Puffin, Komodo, or multiple game server instances on the same machine without some kind of
networking isolation, you must change the BLUEDRAGON_GRPC_SERVER_PORT environment variable for each server to
prevent port conflicts.
To learn how to integrate other server software with BlueDragon's systems, see the Integration Guide
To learn how to create a game using this library, see our ExampleGame repository. It has guides and documentation for creating a simple game.
The project contains a common subproject, which is used by all games as an API to compile against.
This subproject also contains many useful game modules that most games use.
The testing subproject contains testing fixtures and utilities for running automated tests.
The main subproject (in src/*) contains all the code necessary to start the server, load plugins,
and connect with external services like databases and IPC/messaging systems.
It also contains all the global commands and translations.