Matrix Bridge
Matrix Bridge creates a bridge between Minecraft server chat and a Matrix room, allowing Matrix users to communicate with Minecraft players without needing to log into the game world.
Main Features
The mod transmits various server events to Matrix: server startup and shutdown, player connections and disconnections, character deaths, and chat messages. Special commands are also available for Matrix users: '!list' to get the list of online players, '!ping' to check server connection, and '!invite' to add a player to the whitelist.
Technical Features
Authentication is done via password, encrypted rooms and session verification are supported. Configuration is managed through a YAML file, and various databases can be used for data handling: H2 (default), SQLite, MariaDB, and PostgreSQL.
Configuration
config.yaml
# Configuration version
version: 2
# Extended Trixnity logging
verbose: false
# Account settings
account:
homeserver: "https://matrix.example.org"
username: "user"
password: "pass"
device_name: "Matrix-Minecraft Bridge"
room: "!sdfDsdfsA:matrix.example.org"
# Verification
verification:
type: "KEY"
token: "AaAA aaAa AAaa..."
# Database
database:
type: "H2"
name: "database"
hostname: "localhost:3306"
username: "user"
password: "pass"
# Commands
commands:
list:
format: "📜 Online players: %players%"
enabled: true
ping:
format: "🏓 Pong!"
enabled: true
invite:
format:
success: "🔵 '%player%' has been whitelisted!"
error: "🔵 '%player%' could not be found. Usage: !invite <username>"
already: "🔵 '%player%' is already whitelisted!"
enabled: false
invalid_command: "⛔ Command not found! Available commands: %commands%"
disabled_command: "⛔ Command disabled! Please contact an administrator."
# Messages
messages:
start:
format: "❇ Server started"
enabled: true
stop:
format: "🛑 Server stopped"
enabled: true
chat_matrix_to_minecraft:
format: "[§e%player%§r] "
enabled: true
chat_minecraft_to_matrix:
format: "<%player%> "
enabled: true
player_join:
format: "🔹 %player% joined the game"
enabled: true
player_quit:
format: "🔹 %player% left the game"
enabled: true
player_death:
format: "🪦 %message%"
enabled: true
player_advancement:
format: "🎉 %player% has made the advancement '%advancement%'!"
enabled: true
Better Than Adventure Compatibility
For use with Better Than Adventure, Java 11 or newer is required, as the mod will crash on Java 8. A dependency override for Fabric Language Kotlin is also necessary, since BTA Babric doesn't support the required Fabric Loader version.
fabric_loader_dependencies.json
{
"version": 1,
"overrides": {
"fabric-language-kotlin": {
"-depends": {
"fabricloader": "IGNORED"
}
}
}
}
Matrix Bridge uses Trixnity Matrix SDK and requires the Fabric Language Kotlin mod.