Server Connection Plugin
The Server Connection Plugin provides comprehensive player connection management for your network, including network join handling, fallback servers, and navigation commands.
Supported Server Softwares
The following table shows all currently supported proxy implementations:
Software | This Plugin | Server API |
---|---|---|
Velocity | Yes | Yes |
BungeeCord | Yes | Yes |
Gate | Planned | Yes |
Other* | Varies | No |
*Support for other proxies is possible through custom implementation if the server API is available in your preferred programming language.
Quick Setup
- Download the plugin for your proxy software
- Place it in your proxy template's plugins folder
- Configure using
config.yml
Connection Targets
Connection targets are matchers for servers in your network. Based on their server name matcher, they can match single servers or one / multiple server groups. Each target can have specific rules for server name matching as well as for availability for players:
The following example demonstrates, how a connections configuration could look like using different server-name-matchers and rules:
connections:
# This connection matches servers which's name starts with "lobby" and has no rules for access restriction.
- name: "lobby"
server-name-matcher:
operation: "STARTS_WITH"
value: "lobby"
# This connection targets a server which's name is "sb-spawn" and includes two access rules.
- name: "skyblock-spawn"
server-name-matcher:
operation: "EQUALS"
value: "sb-spawn"
rules:
# This rule requires players to have the permission "network.join.skyblock" to access this connection
- type: "PERMISSION"
name: "network.join.skyblock"
value: "true" # "true", because the permission check is expected to be positive.
# This rule requires the environment variable "SKYBLOCK_JOIN_STATE" to not be set to "maintenance" for players to
# access the connection, while allowing players with the permission "rank.admin" to bypass this check.
- type: "ENV"
name: "SKYBLOCK_JOIN_STATE"
value: "maintenance"
operation: "EQUALS"
negate: true # Negates the EQUALS operation, so the environment variable shall not be equal "maintenance".
bypassPermission: "rank.admin" # Adds a permission that lets users bypass this check.
Server Name Matchers
Every connection requires a server name matcher, which matches servers in the network to it by name using various matching operations. A list of available operations is listed down below. Example:
# This server name matcher targets all servers that do not contain "exclusive" in their name.
server-name-matcher:
operation: "CONTAINS" # The matcher operation to use - optional (default: STARTS_WITH).
value: "exclusive" # The value to compare to - required.
negate: true # Negates the outcome of the operation - optional (default: false).
Access Rules
Each connection can have a set of rules which can restrict the access of players to it. An example of how rules can be used in practice is shown above.
Every rule has one of two total types. The default type is ENV
.
PERMISSION
Type Rules
A permission rule performs a permission check on the user and compares the outcome to a given value using an EQUALS
operation:
- type: "PERMISSION"
name: "network.join.skyblock" # The permission to check for - required.
value: "true" # The expected outcome ("true" or "false") - required.
# "true" will expect the permission to be present, "false" does the opposite.
bypassPermission: "rank.admin" # A bypass permission for this check - optional.
ENV
Type Rules
An environment variable rule compares an environment variable to a given value with a specified matcher operation:
- type: "ENV"
name: "SKYBLOCK_JOIN_STATE" # The environment variable to compare - required.
value: "maintenance" # The value to compare to - required.
operation: "EQUALS" # The matcher operation to use - optional (default: STARTS_WITH).
negate: true # Negates the outcome of the operation - optional (default: false).
bypassPermission: "rank.admin" # A bypass permission for this check - optional.
Matcher Operations
Matcher operations are used for server name matchers and environment variable rule checks.
Operation | Description |
---|---|
EQUALS | Exact value match |
STARTS_WITH | Value begins with given value |
ENDS_WITH | Value ends with given value |
CONTAINS | Value contains given value |
REGEX | Value matches given RegEx |
Features
Every feature requires to have a list of target connections configured (target-connections
).
Target connections have priorities to specify which connection is tried first. If the connection cannot be accessed by the player (e.g.: insufficient permissions or no available target servers), the system falls back to lower priorities. Lower values are of higher priority.
On top of the rules of the connection themselves, a list of server name matchers as from-criteria can be added in this context. They allow to only consider the connection if the previous server of the player matches the server name matchers.
Here is an example of a target connection specification:
- name: "lobby" # The name of the connection to utilize - required.
priority: 0 # The priority of this connection - optional (default: 0).
from: # A list of server name matchers as from criteria - optional.
- operation: "EQUALS" # The matcher operation to use - optional (default: STARTS_WITH).
value: "build-server" # The value to compare to - required.
negate: false # Negates the outcome of the operation - optional (default: false).
All message variables of the below features support MiniMessage format for styling.
Network Join Targets
Manages initial servers for player connections to your network. Configure which servers players will be connected to upon join and handling of unavailable targets:
network-join-targets:
enabled: true # Wether this feature shall be enabled - optional (default: false).
# Kick message for when all target connections are full or access rules don't match for the player - required.
no-target-connections-found-message: "<color:red>Couldn't connect you to the network because no target servers are available."
target-connections: # List of target connections (explained above) - required.
- name: "lobby"
priority: 0
Fallback Connections
Handles player redirection when kicked from servers or during server shutdowns:
fallback-connections:
enabled: true # Wether this feature shall be enabled - optional (default: false).
# Kick message for when all target connections are full or access rules don't match for the player - required.
no-target-connections-found-message: "You have been disconnected from the network since you have been kicked and no fallback server are available."
target-connections: # List of target connections (explained above) - required.
- name: "lobby"
priority: 0
Navigation Commands
Create custom commands for server navigation:
commands:
- name: "lobby" # Name of the command - required.
aliases: # List of command aliases - optional.
- "hub"
target-connections: # List of target connections (explained above) - required.
- name: "lobby"
priority: 0
# Message for when the player is already connected to a matching server of the target-connections - required.
already-connected-message: "<red>You are already connected to the lobby!"
# Kick message for when all target connections are full or access rules don't match for the player - required.
no-target-connections-found-message: "There are no lobby servers available at the moment."
permission: "command.lobby" # Permission of this command - optional.
Common Configurations
Game Server Setup
Here's an example configuration for a mini game network:
connections:
- name: "lobby"
server-name-matcher:
operation: "STARTS_WITH"
value: "lobby"
- name: "bedwars"
server-name-matcher:
operation: "STARTS_WITH"
value: "bw"
rules:
- type: "PERMISSION"
name: "minigame.bedwars"
value: "true"
network-join-target:
enabled: true
target-connections:
- name: "lobby"
priority: 0
fallback-connections:
enabled: true
target-connections:
- name: "lobby"
priority: 0
- name: "bedwars" # Will fall back to another bedwars server if the player is kicked from a bedwars server and no lobby is available
priority: 1
from:
- operation: "STARTS_WITH"
value: "bw"
commands:
- name: "lobby"
aliases: ["hub", "l"]
target-connections:
- name: "lobby"
priority: 0
- name: "bedwars"
aliases: ["bw"]
permission: "minigame.bedwars"
target-connections:
- name: "bedwars"
priority: 0
Multi-Lobby System
Example for managing multiple lobby types:
connections:
- name: "main-lobby"
server-name-matcher:
operation: "EQUALS"
value: "lobby-main"
- name: "premium-lobby"
server-name-matcher:
operation: "EQUALS"
value: "lobby-premium"
rules:
- type: "PERMISSION"
name: "vip.lobby"
value: "true"
network-join-target:
enabled: true
target-connections:
- name: "premium-lobby"
priority: 0
- name: "main-lobby"
priority: 1
commands:
- name: "lobby"
aliases: ["hub"]
target-connections:
- name: "premium-lobby"
priority: 0
- name: "main-lobby"
priority: 1
Advanced Usage
Permission-Based Routing
The plugin can route players based on permissions:
- VIP players can be sent to premium servers first
- Staff members can be directed to specific lobbies
- Game access can be restricted by permissions
Fallback Chains
Create sophisticated fallback chains:
- Players are first redirected to game-specific lobbies
- Then to general game lobbies if specific ones are full
- Finally to main lobbies if no game lobbies are available
Command Hierarchies
Implement complex command structures:
- Main navigation commands (
/lobby
,/hub
) - Game-specific commands (
/bedwars
,/survival
) - VIP-only commands with permission checks
- Staff commands for server management
The plugin's flexible configuration system allows you to create intuitive and efficient player routing that scales with your network's needs.