Eufranio / MagiBridge

A Discord <-> Minecraft chat relay plugin
MIT License
47 stars 27 forks source link

[Suggestion] Require a discord linked account to play on the Minecraft server & auto-ban synchronization #203

Closed gilyerm closed 3 years ago

gilyerm commented 3 years ago

Like discordSRV that have the feature that requires a linked discord account to play on the server, it would be great to add it to MagiBridge/MBDiscordLink the feature is when an un-linked account try to login into the Minecraft server, the player is auto-kick from the server, and in the kick message it writes the "Not linked message" or if the server doesn't successfully connect to the discord server it writes the "~DiscordSRV~ still starting" or "Failed for unknown reason" or even if he don't have any/all discord roles on the discord server Additionally, when someone is unlinking there account to the server it's auto-kick them and write in the kick message the "Kicked for unlinking". for example parts from the config from discordSRV linking.yml:

Require linked account to play:
  Enabled: true
...

  # Message to kick players with telling them to link their accounts
...
  Not linked message: "&7You must link your &9Discord &7account to play.\n\n&7Send a DM to &b{BOT}&7 in the Discord server containing just &b{CODE}&7 to link your account.\n\n&7Discord Invite » &b{INVITE}"

  # If enabled, players will not only need to have their accounts linked but will also be required
  # to be a member of a Discord server that the bot is also in.
...
  Must be in Discord server: true

  # Optionally require people to not only be linked but also to have one of or all specified roles like a Twitch sub role
  Subscriber role:
    Require subscriber role to join: false
    Subscriber roles: ["00000000000000000", "00000000000000000", "00000000000000000"]
    Require all of the listed roles: false # when false, only one of the above roles is required
    Kick message: "&cYou must be subscribed on Twitch to be able to play."

Also, discordSRV has this synchronization that if when a player gets banned on the Discord server when they have a linked Discord account, I can optionally ban them on the Minecraft server and vice versa.

for example part of the config from discordSRV synchronization.yml:

...
# Ban synchronization
# When a player gets banned on the server when they have a linked Discord account you can optionally ban them on the Discord server and vice versa
...
#
BanSynchronizationDiscordToMinecraft: true
BanSynchronizationDiscordToMinecraftReason: "&cYou have been banned until further notice from the server because you were banned on our Discord server."
BanSynchronizationMinecraftToDiscord: false
Eufranio commented 3 years ago

This should be a request to MBDiscordLink, not MagiBridge. See https://github.com/Eufranio/MBDiscordLink