Skip to content

Commit

Permalink
docs: bungee mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Misat11 authored Jul 2, 2024
1 parent 6324cb0 commit 64e90d8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 8 deletions.
53 changes: 53 additions & 0 deletions docs/bungee.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# BungeeCord mode

Screaming BedWars supports a BungeeCord mode, which allows for single-arena servers with arena autojoin. This document provides instructions on how to configure this mode.

!!! note "Velocity Support"

This mode is also compatible with Velocity. Ensure `bungee-plugin-message-channel` is enabled in the `velocity.toml` file on your proxy.

## Configuring Game Servers

To enable BungeeCord mode, locate the `bungee` section in `config.yml` and set `enabled` to `true`. Then, configure each option according to your requirements:

* `serverRestart` - Determines whether the server should restart after the game ends. This is not mandatory for the plugin; adjust this setting as needed. To enable server restarts, an existing startup script (`.sh` or `.bat`) must be defined in `spigot.yml`.
* `serverStop` - Similar to `serverRestart`, but only shuts down the server. Use this only if you have separate software managing automatic server startup.
* `server` - Specifies the hub server to which players are moved after the game ends.
* `auto-game-connect` - Determines whether users should automatically join the BedWars game upon server join. This should typically be enabled unless managed by an addon.
* `kick-when-proxy-too-slow` - If the proxy fails to move the player to the hub server or is too slow, the server will kick players who are waiting for too long.
* `random-game-selection` - Enables random selection of arenas if multiple arenas are on the same server. Set `enabled` to `true` to use this feature. The `preselect-games` option is useful for knowing the next selected game before any player joins (at server startup or after the previous game ends).
* `motd` - Useful for server selection plugins utilizing MOTD text, such as [BungeeSigns](https://www.spigotmc.org/resources/bungeesigns.6563/). If enabled, the plugin will update the MOTD based on the current state and player count. There are five states: `waiting`, `waiting_full`, `running`, `rebuilding`, and `disabled`. Use the placeholders `%name%` for arena name, `%current%` for current player count, and `%max%` for maximum player count. Messages can be colored using legacy color codes (`§<color code>`).

The configuration section might look like this:

```yaml
bungee:
enabled: false
serverRestart: true
serverStop: false
server: hub
auto-game-connect: false
kick-when-proxy-too-slow: true
random-game-selection:
enabled: true
preselect-games: false
motd:
enabled: false
waiting: '%name%: Waiting for players [%current%/%max%]'
waiting_full: '%name%: Game is full [%current%/%max%]'
running: '%name%: Game is running [%current%/%max%]'
rebuilding: '%name%: Rebuilding...'
disabled: '%name%: Game is disabled'
```
## Configuring Hub Servers
While there is no lobby plugin for Screaming BedWars, any server selection plugin can be used, such as [BungeeSigns](https://www.spigotmc.org/resources/bungeesigns.6563/). Plugins that can read MOTD are preferred as they can relay the game state to your hub server.
<!-- TODO: list possible options with little tutorials -->
!!! tip "Synchronizing Statistics"
For BungeeCord networks, it is common to synchronize statistics to a database. Configure the `database` section as described [here](config.md#database-connection). Ensure all servers are connected to the same database.

To access statistics in the lobby, the simplest option is to install Screaming BedWars on your hub server as well. Ensure this instance is NOT in BungeeCord mode. Alternatively, you can create an addon to retrieve statistics. The database structure is detailed at the end of the [database configuration section](config.md#database-connection).
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ScreamingBedWars

Flexible BedWars plugin, formerly coded as a replacement for BedwarsRel.
Supported versions: \[1.8.8 - 1.20.6\], recommended versions: \[1.20.4\].
Supported versions: \[1.8.8 - 1.21\], recommended versions: \[1.20.6\].

## Support

Expand Down
9 changes: 2 additions & 7 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,8 @@ It is located under specials, it is not that hard to find 😛
Same goes for basically any other special item. 🙂

## Setting up the plugin with Bungeecord
1. Install bedwars **on every game server**.
2. Open the config.yml file on every game server and modify `bungee.enabled: true` , `bungee.server: yourBungeeLobbyServerName` and `bungee.auto-game-connect: true`
3. Setup an arena on every game server.
4. On your lobby server you should setup some plugin for joining the arena. There are some recommended:
* Get **BungeeSigns** on your lobby server to teleport players to your game servers with signs.
* Get **SimpleInventories** on your lobby server to teleport players to your game server using menus. (You can also use any inventory plugin which supports sending players to other servers)
5. Configure every game server to your liking.

The plugin has a single-arena bungeecord mode. Check out [this page](bungee.md).

## PvP does not work
Make sure:
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ plugins:
nav:
- Home: index.md
- Arena creation: arena.md
- BungeeCord mode: bungee.md
- Configuration: config.md
- Commands and Permissions: commands.md
- Shop: shop.md
Expand Down

0 comments on commit 64e90d8

Please sign in to comment.