Перейти к содержимому
Mineforgian

MatrixSpigotBridge v2

Link a Minecraft server chat with a Matrix.org room - Forked from Lautriva

Загрузки
344
Подписчики
2
Обновлён
7 декабря 2025 г.
Лицензия
MIT

Опубликован 7 декабря 2025 г.

MatrixSpigotBridge v2

MatrixSpigotBridge is a Spigot plugin that uses matrix.org, an instant messaging protocol, to let interact with the players without logging onto the Minecraft server.

This is a fork of MatrixSpigotBridge that aims to continue support and add new features. Currently, this fork adds these features:

  • Asynchronous connection to Matrix Server, so that your server isnt prevented from starting if the plugin is unable to connect.
  • Format messages in config with HTML tags
  • Matrix room commands: ![help | ping | tps | ip | list]

    Screenshot of the Matrix chat displaying the responses of the plugin to the various Matrix room commands

  • In-game commands: /msb [ping | reload | restart]

    Image of the server console displaying the outputs of the mentioned in-game commands

  • Reserialization (preserves formatting) across the two chats

    Image demonstrating how the formatting is preserved across the two chats

PlaceholderAPI is supported so if you have it, you can add fancy placeholders in all plugin's messages :D Here is an example usage

Config:

format:
    player:
        join: '➕ {MESSAGE}'
        quit: '➖ {MESSAGE}'
        death: '🪦 {MESSAGE}'
        chat: <blockquote><b>{PLAYERNAME}</b> from %playerbiomes_biome_name_english%</blockquote>{MESSAGE}

Matrix Chat:

Image showcasing the result of the aforementioned configuration (PlaceholderAPI in action)

(pssst, check out PlayerBiomes here)

Support and Feature Requests in Matrix Chat / SpigotMC Resource Discussion Tab / Discord only! Do NOT use the issues tab for this.

Building:

  1. Clone the project (the version/branch of your choice)
  2. Build using mvn install

Ченджлог

2.5.0Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

Thank you @lautriva for mentioning my fork and giving permission to use your logo! And thank you all for 100+ downloads! Feel free to send me your feature requests and bug reports in the Matrix Room / SpigotMC Resource Discussion Tab / Discord

What's new

  • Upgraded all requests to use the v3 endpoint
  • Better handling of Matrix formatting to Minecraft formatting conversion
  • Bot now automatically joins the configured room if it is not already in the room
  • New built-in placeholder: Timestamps! Use placeholder {TIME:<format>} to insert the current time in the specified format. It should be a valid Java datetime format pattern. Example: {TIME:yyyy-MM-dd HH:mm:ss} gives 2025-11-21 12:48:42. More info on the format
  • Plugin no longer processes messages that were sent before the plugin is fully loaded when the server is starting.
  • Matrix API error responses are now printed on the console to make it clearer for troubleshooting.
  • [Technical] Code refactoring
2.4.1Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

This hotfix release changes the HTTP request made to send messages from POST to PUT (as reported in https://www.spigotmc.org/threads/matrixspigotbridge-v2.691428/#post-4890831) and adds incremental transaction IDs with the request according to spec. If the plugin is working for you then this update is optional.

2.4.0Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

What's new

  • [IMPORTANT] Configuration Update from 2.3.1 to 2.4.0. Please check the latest config.new.yml generated by the plugin and update your config!

  • Set a limit to the number of characters and the number of lines in the Matrix message, exceeding which the message would not be sent in Minecraft chat
  • Message Reactions: Messages filtered by regex or above limits will be reacted with ❗, and unknown commands with ❓.
  • "Disabled commands" logic is removed; now, commands which are not in the available_commands list in your configuration are considered to be unknown commands.
  • bStats has been brought back, but will not be enabled on the first startup (no config file generated). This is required for me to evaluate whether it is worth it to keep working on this plugin even when I am not hosting my own Minecraft server. If you are upgrading from a previous version and want to keep it disabled, add bstats_consent: false under the common section of the configuration
  • Sorry for the frequent configuration changes!
2.3.1Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

This release fixes the available_commands configuration to work as a whitelist as opposed to a blacklist. This is due to a remnant in the code from the unreleased version 2.2.0

2.3.0Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

What's new?

  • [IMPORTANT] Configuration update! from 2.1.1 to 2.3.0; pertaining to the below features. Please check the latest config.new.yml generated by the plugin and update your config!
  • [IMPORTANT] If you have been using markdown symbols to format the Matrix-bound messages in your config, you must change them to their HTML equivalent for them to display properly. Check the comments in the new config for conversion.

  • New Matrix chat commands: help, ip
  • Unknown chat command detection: This will send the unknown command message along with the command list
  • Disable Matrix chat commands: Remove them from the available_commands list in the config
  • Preserve formatting across Minecraft and Matrix chat
  • Blacklist users (may be helpful to filter out other bots, or problematic users :<)
  • Filter messages using regular expressions [regex] (e.g. filtering profanity)
  • Set room topic periodically - check config for more information on how this works

Technical changes

  • Fixed the "nag author(s)" error (plugin is not properly shutting down its async tasks when it is being shut down).
  • Room filter generation now uses JSONObject instead of strings
  • Created ConfigUtils, so that I no longer have to use Spigot Config API anywhere outside it
  • Matrix password login now tries API v3, r0, v1 in that order
  • The plugin now sends each message with a regular body and a formatted_body. When reserialization is disabled in config, both of these take same value. This change brings with it, a 5x increase in jar size because full html formatting is handled using Apache common-text StringEscapeUtils
  • The plugin now automatically removes all consecutive trailing /'s from the homeserver URL. Additionally, some basic config checking is included.

Bugs? Report them in SpigotMC Resource Discussion Tab OR Discord OR the issues tab of this repository, with clear details!

2.1.1Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

What's new?

I apologise for trying to add telemetry to the otherwise fine plugin. I see how this may concern people conscious of telemetry. bstats plugin metrics have been completely removed from the plugin

Technical Changes:

  • Significantly reduced jar size (not correlated to removal of bstats)
2.1.0Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

What's new?

  • [Notice from 2.0.0] IMPORTANT: Configuration changes! Please check the latest config.yml and add the missing config values: common.bstats_consent: true and matrix.command_prefix: "!" to your existing config.yml. PLEASE IGNORE IF UPDATING FROM 2.0.0
  • In-game commands: /msb [ping | reload | restart]
  • Permissions for in-game commands: msb.command.ping, msb.command.reload, msb.command.restart
  • The plugin will now generate a new config.new.yml file if there are changes to the config and you haven't updated it.

Technical changes

  • Connection to the Matrix server is now handled asynchronously. This will prevent the plugin from locking up the server if the connection times out or fails.
2.0.0Релиз1.21.8, 1.21.9, 1.21.10 · 7 декабря 2025 г.

What's new?

  • IMPORTANT: Configuration changes! Please check the latest config.yml and add the missing config values: common.bstats_consent: true and matrix.command_prefix: "!" to your existing config.yml
  • bstats Plugin Metrics is enabled by default, set common.bstats_consent to false in the configuration to opt-out
  • Matrix chat commands: !ping, !tps, !list

Technical changes

  • Switched to maven build system
  • Added internal method: setRoomTopic to change the room's topic (for future usage)

Комментарии

Загружаем…