|
1 | 1 | # Server
|
2 |
| - |
| 2 | + |
| 3 | + |
3 | 4 | 
|
4 | 5 | 
|
5 | 6 |
|
6 | 7 | [](https://bluedragonmc.com)
|
7 | 8 |
|
8 | 9 | BlueDragon's [Minestom](https://minestom.net/) implementation. It currently includes:
|
| 10 | + |
9 | 11 | - Creating isolated instances for different game types and modes
|
10 | 12 | - A modular system for adding functionality to games
|
11 |
| - - This allows for a very high degree of code reusability and simplicity, and makes rapid prototyping of games very quick and easy. |
| 13 | + - This allows for a very high degree of code reusability and simplicity, and makes rapid prototyping of games very |
| 14 | + quick and easy. |
12 | 15 | - System for handling player punishments
|
13 | 16 | - Database support linked to every `Player` using a player provider
|
14 | 17 | - Synchronization with other servers using gRPC messaging and a Mongo database
|
15 | 18 | - Routing players to the correct instance when they join
|
16 | 19 | - Separated, per-instance chat and tablist functionality
|
17 | 20 | - Basic commands
|
18 | 21 |
|
19 |
| -Minestom is a Minecraft server library targeted at developers. Their wiki is available [here](https://wiki.minestom.net). |
| 22 | +Minestom is a Minecraft server library targeted at developers. Their wiki is |
| 23 | +available [here](https://wiki.minestom.net). |
20 | 24 |
|
21 | 25 | ## Usage
|
| 26 | + |
22 | 27 | Build with `./gradlew build` and run the JAR created at `build/libs/Server-x.x.x-all.jar`.
|
23 | 28 | Requires Java 17 or higher.
|
24 | 29 |
|
25 | 30 | ## Development
|
| 31 | + |
26 | 32 | This can be built as a docker container with the following command:
|
| 33 | + |
27 | 34 | ```shell
|
28 | 35 | $ DOCKER_BUILDKIT=1 docker build -t bluedragonmc/server:testing .
|
29 | 36 | ```
|
| 37 | + |
30 | 38 | This uses the `Dockerfile` in the current directory to build an image with the version string `"testing"`.
|
31 | 39 | *Note: A game named `Lobby` must be present for the server to run!*
|
32 | 40 |
|
33 | 41 | Environment variables:
|
34 |
| -* `PUFFIN_VELOCITY_SECRET` - Your Velocity proxy forwarding secret (optional). If not specified, Mojang authentication will be enabled. |
| 42 | + |
| 43 | +* `PUFFIN_VELOCITY_SECRET` - Your Velocity proxy forwarding secret (optional). If not specified, Mojang authentication |
| 44 | + will be enabled. |
35 | 45 | * `BLUEDRAGON_AGONES_HEALTHCHECK_INTERVAL_MS` - The amount of time in between Agones healthcheck pings, in milliseconds.
|
36 | 46 | * `BLUEDRAGON_AGONES_RESERVATION_TIME_MS` - The amount of time in between Agones server reservations, in milliseconds.
|
37 | 47 | * `BLUEDRAGON_AGONES_DISABLED` - Disables Agones integration if set to any value.
|
38 | 48 | * `BLUEDRAGON_ENV_TYPE` - Set to "DEV" to enable development mode.
|
39 |
| -* `BLUEDRAGON_QUEUE_TYPE` - Set to "IPC" to use Puffin or "TEST" for the `TestQueue`. If not present, a default value is inferred. |
| 49 | +* `BLUEDRAGON_QUEUE_TYPE` - Set to "IPC" to use Puffin or "TEST" for the `TestQueue`. If not present, a default value is |
| 50 | + inferred. |
40 | 51 | * `BLUEDRAGON_MONGO_CONNECTION_STRING` - The connection string used to connect to MongoDB.
|
41 | 52 | * `BLUEDRAGON_PUFFIN_HOSTNAME` - The hostname used to connect to Puffin.
|
42 | 53 | * `BLUEDRAGON_LUCKPERMS_HOSTNAME` - The hostname used to connect to LuckPerms.
|
43 | 54 | * `HOSTNAME` - Used to determine the server name. Provided by default in Docker or Kubernetes environments.
|
44 | 55 | * `SERVER_INSTANCE_MIN_INACTIVE_TIME` - The amount of time that an instance must be inactive before it is cleaned up.
|
45 | 56 | * `SERVER_INSTANCE_CLEANUP_PERIOD` - The amount of time in between instance cleanup tasks.
|
| 57 | +* `BLUEDRAGON_PUFFIN_PORT` - The port used to connect to Puffin. Defaults to `50051`. |
| 58 | +* `BLUEDRAGON_GRPC_SERVER_PORT` - The port used to create a gRPC server. Defaults to `50051`. |
| 59 | + |
| 60 | +> [!TIP] |
| 61 | +> If you are running Puffin, Komodo, or multiple game server instances on the same machine without some kind of |
| 62 | +> networking isolation, you must change the `BLUEDRAGON_GRPC_SERVER_PORT` environment variable for each server to |
| 63 | +> prevent port conflicts. |
46 | 64 |
|
47 | 65 | ## Implementation
|
| 66 | + |
48 | 67 | To learn how to integrate other server software with BlueDragon's systems, see the [Integration Guide](./INTEGRATION.md)
|
49 | 68 |
|
50 | 69 | ## Creating a Game
|
51 |
| -To learn how to create a game using this library, see our [ExampleGame](https://github.com/BlueDragonMC/ExampleGame/blob/main/README.md) repository. It has guides and documentation for creating a simple game. |
| 70 | + |
| 71 | +To learn how to create a game using this library, see |
| 72 | +our [ExampleGame](https://github.com/BlueDragonMC/ExampleGame/blob/main/README.md) repository. It has guides and |
| 73 | +documentation for creating a simple game. |
52 | 74 |
|
53 | 75 | ## Project Structure
|
| 76 | + |
54 | 77 | The project contains a `common` subproject, which is used by all games as an API to compile against.
|
55 | 78 | This subproject also contains many useful game modules that most games use.
|
56 | 79 |
|
|
0 commit comments