Home›Java›Mods›Matrix Chat Bridge
Matrix Chat Bridge
ModsJava

Matrix Chat Bridge

Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.

by Sovtoshi · on Modrinth

A powerful, private, and secure bridge between your Minecraft server and a Matrix home server. A self hosted Discord like experience

⬇ Download on Modrinth

🧊 Minecraft Matrix Chat Bridge

Java Spigot Matrix License

A powerful, private, and secure bridge between your Minecraft server and a Matrix homeserver.


🛡️ Why Matrix?

In an era where data privacy and user safety are paramount, Matrix stands out as the superior choice for gaming communities. Unlike Discord or other centralized platforms, Matrix allows you to:

This plugin integrates your Minecraft server directly into this secure ecosystem, providing a seamless experience that feels native to both platforms.


✨ Key Features


🛠️ Prerequisites


📥 Installation

  1. Download the latest matrix-chat-1.0.jar from the releases page.
  2. Drop the jar file into your server's plugins folder.
  3. Restart the server to generate the default configuration file.
  4. Configure plugins/MatrixChat/config.yml (see below).
  5. Important: Manually invite your bot account to the configured bridgeRoom and any other rooms listed in the config. The bot cannot join private rooms automatically without an invite.
  6. Reload or restart to apply changes.

⚙️ Configuration

Edit plugins/MatrixChat/config.yml to connect your worlds.

matrix:
  # 🌐 Your Matrix homeserver URL
  homeserver: "https://chat.yourdomain.com"
  
  # 🤖 The Bot Account
  # IMPORTANT: Must be a Synapse Admin for impersonation to work.
  username: "@bot:chat.yourdomain.com"
  password: "your_secure_password"
  
  # 🌉 The Bridge Room
  # The main channel where chat is shared. The bot must be a member.
  bridgeRoom: "!roomid:chat.yourdomain.com"

  # 📏 Maximum length of a Matrix message to be bridged to Minecraft.
  maxMessageLength: 256

  # 🧱 Bedrock Support
  bedrock:
    prefix: "."
    matrixSuffix: ".b"

  # 📢 Announcements
  announcements:
    join: true
    quit: true
    death: true
    firstJoin: true

  # 📂 Room Management
  rooms:
    # Rooms everyone joins automatically
    default:
      - "!generalid:chat.yourdomain.com"
      - "!updatesid:chat.yourdomain.com"
      
    # 👮 Role-Based Rooms
    # Map permission nodes to specific rooms
    roles:
      mchat.group.staff:
        - "!staffroomid:chat.yourdomain.com"
      mchat.group.vip:
        - "!viproomid:chat.yourdomain.com"

💻 Commands & Permissions

Command Permission Description
/mchat register <password> mchat.register Sets the password for your auto-created Matrix account, allowing you to log in to clients like Element.
/mchat help None Display the help menu.

🧠 How It Works

The Impersonation Magic

Instead of relaying messages like [Bot] Player: Hello, this plugin leverages the Synapse Admin API. It obtains a temporary login token for the specific user and sends the message as them.

Echo Prevention

To prevent the "infinite loop" of messages repeating themselves, the plugin tags bridged messages with a hidden [MC] prefix. The Minecraft listener detects this tag and knows to ignore the message, ensuring a clean chat stream.


🏗️ Building from Source

git clone https://github.com/yourusername/matrix-chat.git
cd matrix-chat
mvn clean package

📄 License

Distributed under the MIT License. See LICENSE for more information.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more