MagiBridge - A utility Discord <-> Minecraft chat relay plugin

This is a discussion topic for the Ore project, MagiBridge. View the full project on Ore for downloads and more information.


img

Logo made by @fcpwiz

Want quick support? Join the MagiBridge discord server: https://discord.gg/YttMwEr

MagiBridge, by Eufranio

MagiBridge is a Sponge plugin that creates a Discord <-> Minecraft chat bridge, forwarding messages from/to both sides, through JDA and supported chat plugins.

Features:

  • Link Nucleus/UltimateChat channels to discord channels (sends messages from the in-game chat to discord and vice versa)
  • Link as many UltimateChat channels you want
  • Sends server start/stop messages to Discord
  • Respects Nucleus’ staff channel (forward chat from it only to the discord staff channel and vice versa)
  • Run console commands from Discord (by default, !cmd ), if you have the defined Discord role
  • Sends join/quit messages to Discord
  • Includes a player count command (by default, !online). It will show you a nice list of players online
  • Per-channel message format override: you can set different message templates for every channel you want
  • Adds the /mb that sends a raw message to a specific channel using the bot. Admin only! (the permission is magibridge.admin.broadcast)
  • Respects the channels the bot is listening for the !online and console commands
  • Updates the channel topic with info like the server TPS, online player count, uptime and etc every second
  • Sends achievement get messages to Discord
  • Sends death messages to Discord
  • Supports getting the player’s prefix in messages
  • Supports Webhooks: if enabled, instead a bot sending the messages, webhooks will. They will have the player’s skin and name. Try it out!
  • AFK messages: send messages on AFK events to Discord!

How to MagiBridge:

  1. Go to https://discordapp.com/developers/applications/me and create a new App

  2. Scroll down and click on “Create a Bot User”

  3. Reveal the Token and copy-paste it into the bot-token="…" field in the config/magibridge/MagiBridge.conf file

  4. Create a new Discord Server. It will have a #general channel. You can create other channels.

  5. Add the bot to your server: Find the Client ID of the new App, and replace the CLIENTID in the following link with your bot’s client ID in
    https://discordapp.com/oauth2/authorize?client_id=CLIENTID&scope=bot (for example, if you bot’s Client ID is 168682538028630017, your link would be https://discordapp.com/oauth2/authorize?client_id=168682538028630017&scope=bot), select Your Server from the drop-down menu, and Authorize. You must have the Manage Server permission to add a bot to a server!

  6. On Server Settings, in Roles, create a New Role named e.g. “bot”, give it the Manage Channels permission, and in Members grant your Bot that role.

  7. Enable Discord Developer Mode and copy-paste the channel ID you want to use into the main-discord-channel=" "

  8. Make sure you have the compatibility features enabled and properly configured in MagiBridge.conf for Nucleus, UltimateChat and Boop if you’re using them

  9. Configure the rest of the stuff you want and reload the plugin/start the server

  10. Profit

Note: almost all messages and/or commands are completely translatable/modifiables. You can change them by modifying the message string of the message in the config!

Permissions

  • magibridge.silentjoin - doesn’t trigger a join message when the player joins the server
  • magibridge.silentquit - doesn’t trigger a quit message when the player leaves the server
  • magibridge.everyone - allow the player to use @everyone on messages sent to Discord
  • magibridge.admin.broadcast - allows the use of the /mb <channel> <message> command to send messages to Discord
  • magibridge.chat (granted by default) - allows messages from the player to be sent to Discord
  • magibridge.mention (granted by default) - allows players to mention discord users

Supported plugins:

UltimateChat, from FabioZumbi12, Nucleus, from dualspiral

Planned support:

None, suggest one if you want in the Issues tab =)

Download

You can download MagiBridge from the versions tab.

Issues / Suggestions

You can suggest additions or report issues by creating a ticket in the Issues tab, and I’ll try to fix it asap.

Support me!

If you like the plugin, consider donating via PayPal to [email protected]

3 Likes

A new version has been released for MagiBridge, it is available for download here.


Added the Nucleus Hook, staff messages will be sent to the staff channel, while normal messages goes to the global channel.

Many people get annoyed because DiscordBridge doesn’t support Boop, have you any plans on including that?

Does MagiBridge support BungeeChat out of the box?

I will try to support Boop when the Nucleus Hook is enabled (currently I dont handle UChat messages, so it’s up to @FabioZumbi12 add support on UC), but first I need to be a bit more familiarized with the Text objects, MagiBridge messages are simple strings atm.

It does not atm, but that’s a nice suggestion. Mind opening a ticket in the issue tracker, so I can take a look on it later?

A new version has been released for MagiBridge, it is available for download here.


A utility Discord <-> Minecraft chat relay plugin

A new version has been released for MagiBridge, it is available for download here.


  • Added Discord Console Command (you can use it by sending a !cmd <command> on a Discord channel and having the requiered role (admin by default), can be changed)
  • Added join/quit messages
  • Added the Player Count Command (by default, !online, can be changed)
  • Improved the code a bit

A new version has been released for MagiBridge, it is available for download here.


Added per-channel message format override. Now, you can format the messages based on their channel!

http://prntscr.com/fvclsu I keep getting this error when sending a message form the discord channel how would I go about fixing this?

You have to use LATEST UltimateChat builds (you can get the latest UChat Sponge build from here). Try again with it updated and see if that fixes your issue.

A new version has been released for MagiBridge, it is available for download here.


  • Added the /mbroadcast command. It sends the specified message in the specified discord channel. The permission to use this command is magibridge.admin.broadcast, don’t forget to add it!
  • Player list and console commands are now restricted to the channels the plugin is acting in, so they won’t work in non-related chat channels.
  • Added channel topic updater: MagiBridge will try to update the topic of the main discord channel defined in the config.
  • Added achievement get and death messages support. You can disable them in the config if you don’t want it.

A new version has been released for MagiBridge, it is available for download here.


  • Added Webhooks! If enabled (check out your config), instead sending messages through a bot, it will send via webhooks with the player’s name and skin!
  • Added the %prefix% placeholder that shows the player’s current prefix in messages. You will need a permission plugin or other thing that sets your prefix!

A new version has been released for MagiBridge, it is available for download here.


  • Added MCClans chat filter (ally and clan chat shouldn’t be sent to discord anymore)
  • Added a little debug to help finding config issues
  • Added a configurable option to set the URL that the webhooks should retrieve the skins from
  • Added a null check to JDA (idk even if it is needed, but it was causing some weird behaviours)
  • Added Discord -> MC message replacer: you can replace things that you don’t want to see in-game in the messages. By default, replaces emojis
  • Added bot game status message, it will set the bot “playing” status if defined
  • Added %toprole% placeholder that will be converted in the highest role name of the Discord user
  • Added Boop support (note: you NEED latest Boop! Update it if you haven’t already: Boop)
  • Configurable format for the player name in the !online command
  • Add server-to-discord-staff-format config option, so you can format the Nucleus staff chat messages differently
  • Fix formatting codes being included in the prefix placeholder
  • Fix message content getting all the message body/head
  • Fix typo in the player list command
  • Fix debug key not being printed correctly
  • Relocate org.json so it won’t crash anymore if another plugin loads a newer/older version of it

A new version has been released for MagiBridge, it is available for download here.


  • Remove prefix color codes only once
  • Added %topgroup% placeholder in messages, it will be replaced with the user’s highest group name (if LuckPerms is installed)
  • Fixed non-players (pixelmon mobs, NPCs) triggering the message event and sending messages to discord
  • Ignore console and player list commands (so they aren’t sent to the game anymore)
  • Fixed a typo in the player list command, followed by a ArrayIndexOutOfBoundsException
  • Add prefix placeholder to join and quit messages
  • Finally added attachment messages to the game. The users will see a nice [Attachment] text in the chat when someone sends a file in Discord, and clicking in the attachment message will open the URL of it.
  • Fixed typo in the webhooks message placeholder that included the whole message in the placeholder instead only the body

A new version has been released for MagiBridge, it is available for download here.


Note: this is a BIG update, I suggest that you all regen your configs when updating from previous releases.

Changelog:

  • Fixed color codes from prefixes being sent to Discord when Webhooks are enabled
  • Added %topgroup% placeholder that displays the player’s highest group name
  • Fixed MCClans messages going to Discord
  • Added a check to make sure the message going to Discord is from a real player. Fixes CustomNPCs and pokemons’ messages being broadcasted
  • Fixed online/console commands being sent to the game when requested on Discord
  • Fixed some errors regarding the player list command
  • Added %prefix% placeholder to the player list command
  • Added Attachament messages support. They will be shown as a clickable [Attachament] on the game, and ONLY when Nucleus is loaded
  • Fixed typo in the webhooks %messages% placeholder (prefix and name going trough it)
  • Fixed NPE when using /tell (on latest UChat versions)
  • Fixed wrong maximum message size, now only 120 chars are sent to the game
  • Added role requirement for using color codes
  • Added delete time for console/player list commands
  • No permission message added to the config
  • Added permission node to tag everyone from the game (magibridge.everyone)
  • Added in-game user mentioning: players can mention Discord users from the game
  • Prevent NPE in the topic updater, so it won’t stop working anymore
  • Added command-role-override: restrict certain commands to certain Discord roles
  • Added %topgroup% placeholder to the player list command

A new version has been released for MagiBridge, it is available for download here.


Added support for Sponge API 7 (Minecraft 1.12+)

A new version has been released for MagiBridge, it is available for download here.


  • Updated UltimateChat and Nucleus APIs
  • Refactor MC <-> Discord code, now it allows an even better placeholders system
  • Add a explanation of the placeholders to the config
  • Added a prefix to messages sent to MC, it contains a hover and clickable text that can open a URL (usually to the discord invite)
  • Added option to disable deleting the player list and command message s
  • Added the %nick% placeholder that is replaced by the Nucleus’ player nickname, if present
  • Fixed console and player list commands not working
  • Hide player from the player list if vanished

Be careful with that discord logo remix, this is most likely against their branding policy.

I’ve emailed them when I first used this logo and they told me I can use it as long as I’m not acting as if it is an official plugin/bridge/program. Thanks for the hint tho!

1 Like