-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bd37f7
commit 85ad458
Showing
6 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
--- | ||
title: Development Environment Setup | ||
description: A guide in my new Starlight docs site. | ||
description: How to work on BlueDragon in development mode | ||
--- | ||
|
||
## Limitations | ||
|
||
Working in development mode means that you cannot use or test any features that rely on messaging, like parties and matchmaking. | ||
|
||
## Setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Example Game | ||
description: Explore the code of BlueDragon's example game and use it to build your own. | ||
--- | ||
|
||
import { LinkCard } from "@astrojs/starlight/components"; | ||
|
||
<LinkCard | ||
title="Example Game GitHub Repository" | ||
description="Click here to explore the code of our sample game." | ||
href="https://github.com/BlueDragonMC/ExampleGame" | ||
/> | ||
|
||
Exploring the example game is the best way to get started with BlueDragon software. | ||
This guide will break down the [main class](https://github.com/BlueDragonMC/ExampleGame/blob/main/src/main/kotlin/com/bluedragonmc/games/examplegame/ExampleGame.kt) | ||
and the necessary [configuration file](https://github.com/BlueDragonMC/ExampleGame/blob/main/src/main/resources/game.properties). | ||
|
||
## Configuration File | ||
|
||
```properties | ||
# The game.properties file defines the game's main class (which extends com.bluedragonmc.server.Game) | ||
# It is used by the plugin loader to determine which class to instantiate when a game is requested. | ||
# The name is also used to populate menus and command completion. | ||
name=ExampleGame | ||
main-class=com.bluedragonmc.games.examplegame.ExampleGame | ||
``` | ||
|
||
## Main Class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,75 @@ | ||
--- | ||
title: Quickstart | ||
description: A guide in my new Starlight docs site. | ||
sidebar: | ||
order: 0 | ||
--- | ||
|
||
## Requirements | ||
|
||
1. You must have Java 17 or later installed. | ||
2. This guide assumes you're using a Bash-like shell. Use Linux for best results; on Windows, you can modify the scripts or use [WSL](https://learn.microsoft.com/en-us/windows/wsl/). | ||
3. [Docker](https://docs.docker.com/desktop/) is recommended to quickly run the required MongoDB and LuckPerms services. | ||
|
||
## Setup | ||
|
||
1. Clone the `Server` and `ExampleGame` repositories: | ||
|
||
```sh | ||
git clone https://github.com/BlueDragonMC/Server | ||
git clone https://github.com/BlueDragonMC/ExampleGame | ||
``` | ||
|
||
2. Build the `Server` project: | ||
|
||
```sh | ||
cd Server | ||
./gradlew build | ||
``` | ||
|
||
3. Build the example game: | ||
|
||
```sh | ||
cd ../ExampleGame | ||
./gradlew build | ||
``` | ||
|
||
4. Copy the JARs into their appropriate places: | ||
|
||
```sh | ||
cd .. | ||
mkdir -p ./run/games | ||
cp Server/build/libs/Server-1.0-SNAPSHOT-all.jar run/server.jar | ||
cp ExampleGame/build/libs/ExampleGame-1.0-SNAPSHOT.jar run/games/ExampleGame.jar | ||
``` | ||
|
||
5. Copy a world folder: | ||
|
||
_You will need a Minecraft world that was saved on the same version as BlueDragon's Minestom dependency. At the time of writing, this is 1.20.1._ | ||
|
||
```sh | ||
mkdir -p ./run/worlds | ||
cp YOUR_WORLD_FOLDER run/worlds/ExampleGame/ExampleMap | ||
``` | ||
|
||
6. Run dependencies: | ||
|
||
```sh | ||
docker run -d -p 27017:27017 mongo | ||
docker run -d -p 8080:8080 ghcr.io/luckperms/rest-api | ||
``` | ||
|
||
7. Start the server: | ||
|
||
```sh | ||
cd ./run | ||
BLUEDRAGON_DEFAULT_GAME=ExampleGame java -jar server.jar | ||
``` | ||
|
||
_The BLUEDRAGON_DEFAULT_GAME environment variable tells the server to send players into the ExampleGame instead of looking for a game called `Lobby`_ | ||
|
||
## Further Reading | ||
|
||
- Learn more about [the `worlds` folder](/reference/worlds-folder). | ||
- Explore the code of [the example game](/intro/example-game/) and [create your own](/guides/creating-a-game/) from scratch. | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Worlds Folder | ||
description: The file structure and required files in the server's worlds directory. | ||
--- |