A professional Minecraft multi-server communication plugin that uses RabbitMQ for reliable inter-server messaging. This plugin is designed to facilitate testing and management of multi-server setups by providing real-time communication, monitoring, and synchronization between different Minecraft servers.
- Minecraft Server 1.21.4+ (Paper/Spigot)
- Java 21+
- RabbitMQ Server
- Install RabbitMQ server (see RabbitMQ Installation Guide or use Docker):
docker run -d --hostname rabbitmq --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
- Build the plugin using Gradle:
./gradlew build - Place the generated JAR file in each server's
pluginsfolder - Configure each server with unique settings (see Configuration section)
- Start your servers
For a typical multi-server setup, each server needs unique identification:
Game Server 01 (config.yml):
server:
id: "server01"
name: "Game Server 01"
features:
chatSync:
enabled: true
format: "[{server}] <{player}> {message}"
commands:
enableTestCommands: trueGame Server 02 (config.yml):
server:
id: "server02"
name: "Game Server 02"
features:
chatSync:
enabled: true
format: "[{server}] <{player}> {message}"
commands:
enableTestCommands: trueAll commands require appropriate permissions (chapeau.admin or chapeau.test). Commands can be disabled via configuration.
/chapeau status- Show plugin and server status/chapeau servers- List all known servers and their status/chapeau handlers- Show registered message handlers/chapeau reload- Reload the plugin configuration
/chapeau test- Send a test broadcast message/chapeau send <server> <message>- Send a message to a specific server/chapeau broadcast <message>- Broadcast a message to all servers/chapeau custom <server> <action> [data]- Send custom messages with actions
The custom command supports various actions for advanced testing:
ping- Send a ping request to a serverplayer_count- Request player count from a serverexecute_command <command>- Execute a safe command on remote serverserver_info- Get detailed server information
# Basic commands
/chapeau status
/chapeau servers
/chapeau handlers
# Test commands (if enabled)
/chapeau test
/chapeau send server02 Hello from server01!
/chapeau broadcast System maintenance in 5 minutes
# Custom commands
/chapeau custom server02 ping
/chapeau custom server02 player_count
/chapeau custom server02 execute_command say Hello from server01!
/chapeau custom server02 server_infochapeau.admin- Full access to all commands (default: op)chapeau.test- Access to test commands (default: op)
The plugin uses an extensible handler architecture:
- ChapeauMessageHandler: Base interface for message processing
- MultiTypeMessageHandler: Interface for handlers processing multiple message types
- HandlerContext: Provides utilities and services to handlers
- Built-in Handlers: TestMessageHandler, ServerManagerHandler, ChatSyncHandler, ExampleCustomHandler
HEARTBEAT- Server health monitoring with automatic cleanupSTATUS_UPDATE- Server status and player count changesPLAYER_SYNC- Player join/quit events across serversCHAT_BROADCAST- Cross-server chat synchronizationTEST_MESSAGE- Testing communication (can be disabled)SERVER_STARTUP/SHUTDOWN- Server lifecycle eventsCUSTOM- Extensible custom message types
-
Install RabbitMQ locally or use Docker:
docker run -d --hostname rabbitmq --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
-
Start multiple Minecraft servers with different configurations
-
Use the plugin commands to test communication between servers
Enable comprehensive debug logging in config.yml:
messaging:
debug: true # Enables detailed message loggingThis will log:
- All sent and received messages
- Handler execution details
- Connection status changes
- Configuration loading information
The plugin supports custom message handlers for extended functionality:
public class MyCustomHandler implements ChapeauMessageHandler {
@Override
public String getMessageType() {
return "my_custom_type"; // Or add to MessageType enum your custom type
}
@Override
public boolean handleMessage(Message message, HandlerContext context) {
// Process your custom message
return true;
}
@Override
public int getPriority() {
return 50; // Higher priority handlers execute first
}
}
// Register in your plugin
plugin.getHandlerRegistry().registerHandler(new MyCustomHandler());The plugin is designed with extensibility in mind, making it easy to add new features while maintaining compatibility.