▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/DiscordIO
DiscordIO

DiscordIO

Whitelist with discord, ban with discord. Get notified when the server starts/stops. Get minecraft messages in discord. Fabric/Velocity

128
5

Features

  • Works on both Velocity proxies and Fabric servers
  • Highly configurable (see config.yaml and language.yml for all the things you can mess with)
  • Custom discord messages on server start and stop
  • Custom discord messages when players connect and disconnect
  • Custom discord message when players message in game
  • Custom minecraft messages when user message on discord
  • Whitelisting feature to people make whitelist requests via discord
  • Banning feature to punish those that are annoying (kick them multiple times, ban them permanently/for a certain duration)

Configs:

config.yml version 0.3.0

See github.com for an up to date version

# !This file must be setup before using this plugin!
# Once a feature is enabled, disabling it again may result in undefined behavior
# If you really want to disable a feature, but this wrecks your whitelist/install, you should delete the data.yml file

botToken:   "Insert your token here, see the README.md on how to get a token"
# Guild ID is needed for adding commands
guildId:    "Insert your guild id here (the ID of your discord server)"

# Discord messages for in game events
events:
  onStart:
    enabled: false
    channel: "id..."
    
  onStop:
    enabled: false
    channel: "id..."

  onJoin:
    enabled: false
    channel: "id..."

  onLeave:
    enabled: false
    channel: "id..."

  onMessage:
    enabled: false
    minecraftToDiscord: true
    discordToMinecraft: true

    # Uncomment the one that applies to your server type:

    # For fabric:
    # channels:
    #   fabric: "id..."

    # For velocity
    # (The server names are the ones specified in the velocity.toml file you configured)
    # Do not share discord channels if you have discordToMinecraft enabled
    # channels:
    #   server1: "id..."
    #   server2: "id..."


# If enabled, will use the UUID registered at mojang for verification
# !Will force the server into online mode!
# You currently cannot change this setting after you have someone whitelisted, so choose carefully
# If you really want to change this, delete the data.yml file (this will remove all whitelisted players, they will need to be whitelisted again)
useUUID: true
# If enabled only one minecraft account is allowed per discord user
# You currently cannot change this setting after you have someone whitelisted, so choose carefully
# If you really want to change this, delete the data.yml file (this will remove all whitelisted players, they will need to be whitelisted again)
connectAccounts: true

# Whitelisting via discord
whitelist:
  enabled: false

  # Should this plugin give someone that is whitelisted a special role
  giveRoleOnWhitelist: false
  # The role to give a player when he is whitelisted (only if giveRoleOnWhitelist=true)
  # Enable developer options to get the role ID easily from the discord server settings:
  whitelistedRoleID: ""

  onAccept:
    enabled: true
    channel: "id..."
  onDeny:
    enabled: true
    channel: "id..."
  request:
    enabled: true
    channel: "id..."
    checkRoles: false
    allowedRoles: []
  voting:
    # If disabled, a request will imply immediate whitelist
    enabled: true
    channel: "id.."
    checkRoles: false
    allowedRoles: []
    acceptVotes: "50%"
    denyVotes: "1"

# Banning via discord
banning:
  enabled: false

  # Should this plugin give someone that is banned a special role
  giveRoleOnBan: false
  # The role to give a player when he is banned (only if giveRoleOnBan=true)
  # Enable developer options to get the role ID easily from the discord server settings:
  bannedRoleID: ""

  onAccept:
    enabled: true
    channel: "id..."
  onDeny:
    enabled: true
    channel: "id..."
  request:
    enabled: true
    channel: "id..."
    checkRoles: false
    allowedRoles: []
    # Choose one of the following ways a user can choose who he wants to ban:
    # - "discord" select the discord username they want banned (cannot be used if connectAccounts=false)
    # - "minecraft" select the minecraft username they want banned
    identifier: "discord"
  punishment:
    # If disabled, a request will proceed as a perm ban request to reason picking
    enabled: true
    channel: "id..."
    checkRoles: false
    allowedRoles: []
    acceptVotes: "50%"
    denyVotes: "1"
    punishments:
      # If you do not keep the none punishment, the admins cannot deny a ban request
      "None":
        type: None
      "Permanent ban":
        type: PermBan
      "5m ban":
        type: Ban
        duration: 300
      "1h ban":
        type: Ban
        duration: 3600
      "2h ban":
        type: Ban
        duration: 7200
      "1d ban":
        type: Ban
        duration: 86400
      "kick 1x":
        type: Kick
        duration: 1
      "kick 3x":
        type: Kick
        duration: 3
  reason:
    # If disabled, a request will keep the reason of the request
    enabled: true
    channel: "id..."
    checkRoles: false
    allowedRoles: []
    acceptVotes: "50%"
    denyVotes: "1"

maintenance:
  # Disables events and rejects everyone not on the crew list
  enabled: false
  # Enable maintenance mode from the config:
  inMaintenance: false
  # Players allowed to join during maintenance
  # Use UUID's if useUUID=true, else use player names
  # This does not override the whitelist and banning features, you still need to be whitelisted to enter
  crew: ["player1", "player2"]
  # Command to enable maintenance mode via discord
  command:
    enabled: false
    checkChannel: true
    allowedChannels: ["id..."]
    checkRoles: false
    allowedRoles: []
  # On start messages
  onStart:
    enabled: false
    channel: "id..."
  # On end message
  onStop:
    enabled: false
    channel: "id..."
language.yml version 0.3.0

See github.com for an up to date version

embeds:
  #
  # *************************************************************************
  #  Events                                                                 *
  # *************************************************************************
  #
  events:
    embeds:
      onStart:
        title: "-------------[Online]-------------"
        description: ":green_circle: **Proxy** is online!"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      onStop:
        title: "-------------[Offline]-------------"
        description: ":no_entry: **Proxy** is offline!"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      onJoin:
        title: "-------------[Connected]-------------"
        description: "**${PLAYER_NAME}** joined the server!"
        imageUrl: "https://minotar.net/helm/${PLAYER_NAME}/240.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      onLeave:
        title: "-------------[Disconnected]-------------"
        description: "**${PLAYER_NAME}** left the server!"
        imageUrl: "https://minotar.net/helm/${PLAYER_NAME}/240.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      onMessage:
        description: "[${PLAYER_NAME}] ${MESSAGE}"

  #
  # *************************************************************************
  #  Whitelisting                                                           *
  # *************************************************************************
  #
  whitelist:
    embeds:
      alreadyWhitelisted:
        title: "Sorry, you already made a whitelist request."
        description: "You are either already whitelisted, or you made a request previously that is being approved. Please wait patiently"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "BLUE"

      request:
        title: "------------[Request access]------------"
        description: "Do you also want to be whitelisted?\nClick the button below to request access to the minecraft server!"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          button:
            label: "Request whitelist"
            emoji: "U+2705"
        color: "BLUE"

      notAllowed:
        title: "You are not allowed to request to be whitelisted"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      requestConfirm:
        title: "Is this you?"
        description: "Check if the skin below is from your account ${PLAYER_NAME}"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          confirm:
            label: "This is me"
            emoji: "U+2705"
          cancel:
            label: "Cancel"
            emoji: "U+26D4"
        color: "BLUE"

      notFound:
        title: "Your player was not found"
        description: "Your player was not found at the Mojang servers"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"

      requestCanceled:
        title: "Request was canceled"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"

      requestConfirmed:
        title: "Your request will be reviewed by the admins"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"

      voting:
        title: "------------[Whitelist request]------------"
        description: "The discord user <@${DISCORD_UUID}> would like to have his minecraft account **${PLAYER_NAME}** to be whitelisted.\n**${ACCEPT_VOTES}** votes are in favor, **${DENY_VOTES}** votes are against. (${MIN_ACCEPT_VOTES} votes are needed to accept and ${MIN_DENY_VOTES} votes are needed to deny the request)"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          accept:
            label: "Accept"
            emoji: "U+2705"
          deny:
            label: "Deny"
            emoji: "U+26D4"
        color: "GREEN"

      votingDenied:
        title: "------------[Whitelist denied]------------"
        description: "The request from the user <@${DISCORD_UUID}> to have **${PLAYER_NAME}** be whitelisted was denied"
        imageUrl: "https://minotar.net/avatar/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      votingAccepted:
        title: "------------[Whitelist accepted]------------"
        description: "The request from the user <@${DISCORD_UUID}> to have **${PLAYER_NAME}** be whitelisted was accepted"
        imageUrl: "https://minotar.net/avatar/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      votingNotAllowed:
        title: "You are not allowed to vote"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      publicDenied:
        title: "------------[Whitelist denied]------------"
        description: "**${PLAYER_NAME}** did not get whitelisted\n(Requested by <@${DISCORD_UUID}>)"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      publicAccepted:
        title: "------------[Whitelist accepted]------------"
        description: "**${PLAYER_NAME}** got whitelisted\n(Requested by <@${DISCORD_UUID}>)"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

  #
  # *************************************************************************
  #  Banning                                                               *
  # *************************************************************************
  #
  banning:
    embeds:
      request:
        title: "------------[Request punishment]------------"
        description: "Is someone being annoying?\nClick the button below to request a ban"
        actions:
          button:
            label: "Request ban"
            emoji: "U+2705"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      alreadyRequested:
        title: "Sorry, you already made a ban request."
        description: "You made a ban request previously that is being approved. Please wait patiently"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "BLUE"

      playerNotFound:
        title: "That discord user is not registered"
        description: "The discord user does not have a minecraft account linked. The request is ignored"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "BLUE"

      requestNotAllowed:
        title: "You are not allowed to request a ban"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      requestConfirm:
        title: "Do you want to ban this user?"
        description: "Check if the skin below is from your account ${PLAYER_NAME}"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        actions:
          confirm:
            label: "This is him"
            emoji: "U+2705"
          cancel:
            label: "Cancel"
            emoji: "U+26D4"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      requestNotFound:
        title: "The user was not found"
        description: "There was no account found associated with the discord user"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"

      requestCanceled:
        title: "Request was canceled"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"

      requestConfirmed:
        title: "Your request will be reviewed by the admins"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"

      punishmentPicker:
        title: "Ban request - punishment"
        description: "The discord user <@${DISCORD_UUID}> would like to have the minecraft account **${PLAYER_NAME}** to be banned because:\n\"${REASON}\""
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          punishment:
            label: "Punishment"
        color: "ORANGE"

      punishmentVoting:
        title: "Ban request - punishment"
        description: "The discord user <@${DISCORD_UUID}> would like to have the minecraft account **${PLAYER_NAME}** to be banned because:\n\"${REASON}\".\n <@${ADMIN_UUID}> suggests **${PUNISHMENT}** \n**${ACCEPT_VOTES}** votes are in favor, **${DENY_VOTES}** votes are against. (${MIN_ACCEPT_VOTES} votes are needed to accept and ${MIN_DENY_VOTES} votes are needed to deny the request)"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          accept:
            label: "Accept"
            emoji: "U+2705"
          deny:
            label: "Deny"
            emoji: "U+26D4"
        color: "ORANGE"

      punishmentDecided:
        title: "Ban request - punishment"
        description: "**${PLAYER_NAME}** will get the following punishment: **${PUNISHMENT}**"
        imageUrl: "https://minotar.net/avatar/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      punishmentVotingNotAllowed:
        title: "You are not allowed to vote"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      reasonPicker:
        title: "Ban Request - Reason"
        description: "The discord user <@${DISCORD_UUID}> would like to have the minecraft account **${PLAYER_NAME}** to receive a ${PUNISHMENT} because:\n\"${ORIGINAL_REASON}\". This reason was denied, what should the reason be?"
        imageUrl: "https://minotar.net/head/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          change:
            label: "Change reason"
        color: "ORANGE"

      reasonFirstVote:
        title: "Ban request - Reason"
        description: "The discord user <@${DISCORD_UUID}> would like to have the minecraft account **${PLAYER_NAME}** to receive a ${PUNISHMENT} because:\n\"${REASON}\".\n Is this a good **reason**? \n**${ACCEPT_VOTES}** votes are in favor, **${DENY_VOTES}** votes are against. (${MIN_ACCEPT_VOTES} votes are needed to accept and ${MIN_DENY_VOTES} votes are needed to deny the request)"
        imageUrl: "https://minotar.net/head/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          accept:
            label: "Accept"
            emoji: "U+2705"
          deny:
            label: "Deny"
            emoji: "U+26D4"
        color: "ORANGE"

      reasonVoting:
        title: "Ban request - Reason change"
        description: "The discord user <@${DISCORD_UUID}> would like to have the minecraft account **${PLAYER_NAME}** to receive a ${PUNISHMENT} because:\n\"${ORIGINAL_REASON}\".\n\n <@${ADMIN_UUID}> suggests to change the reason to \"${REASON}\" \n\n**${ACCEPT_VOTES}** votes are in favor, **${DENY_VOTES}** votes are against. (${MIN_ACCEPT_VOTES} votes are needed to accept and ${MIN_DENY_VOTES} votes are needed to deny the request"
        imageUrl: "https://minotar.net/head/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        actions:
          accept:
            label: "Accept"
            emoji: "U+2705"
          deny:
            label: "Deny"
            emoji: "U+26D4"
        color: "ORANGE"

      reasonDecided:
        title: "Ban request - Reason"
        description: "**${PLAYER_NAME}** will get the following punishment: **${PUNISHMENT}**. This because \"${REASON}\""
        imageUrl: "https://minotar.net/avatar/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      reasonVotingNotAllowed:
        title: "You are not allowed to vote"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

      publicDenied:
        title: "------------[Ban denied]------------"
        description: "**${PLAYER_NAME}** did not get banned\n(Requested by <@${DISCORD_UUID}>)"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      publicAccepted:
        title: "------------[Ban accepted]------------"
        description: "**${PLAYER_NAME}** got a ${PUNISHMENT} because '${REASON}'\n(Requested by <@${DISCORD_UUID}>)"
        imageUrl: "https://minotar.net/body/${PLAYER_NAME}/100.png"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "RED"

  #
  # *************************************************************************
  #  Maintenance                                                            *
  # *************************************************************************
  #

  maintenance:
    embeds:
      onStart:
        title: "------------[Maintenance]------------"
        description: "Sorry, the server is in maintenance mode, you cannot join right now"
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "YELLOW"

      onStop:
        title: "------------[Maintenance]------------"
        description: "The server is back online, the maintenance has ended."
        footer:
          message: "${CURRENT_DATE} ${CURRENT_TIME}"
        color: "GREEN"

      notAllowed:
        title: "Sorry, you are not allowed to use this command"

      wrongChannel:
        title: "Sorry, yoy cannot use this command in this channel"

      command:
        title: "Consider it done boss"

#
# *************************************************************************
#  Modals                                                                 *
# *************************************************************************
#
modals:
  whitelist:
    modals:
      request:
        title: "Whitelist request"
        actions:
          username:
            label: "Username"
            placeholder: "Steve1234"

  banning:
    modals:
      request:
        title: "Ban request"
        actions:
          discordUser:
            label: "Discord user"
          minecraftUser:
            label: "Minecraft account"
          reason:
            label: "Reason"
            placeholder: "Please give a good reason why you want this player banned"
      reasonChange:
        title: "Change reason"
        actions:
          reason:
            label: "Reason"
            placeholder: "${ORIGINAL_REASON}"
            value: "${ORIGINAL_REASON}"

#
# *************************************************************************
#  Commands                                                               *
# *************************************************************************
#
commands:
  maintenance:
    name: "maintenance"
    description: "A command to start or stop the maintenance mode"
    options:
      startStop:
        name: "start-stop"
        description: "Either start or stop the maintenance mode"
        options: ["start", "stop"]

Download

Go to modrinth.com to download this mod

Setup

See discord.com/developers/docs/quick-start/getting-started for more information.

  1. Start your (fabric, or velocity) server, and stop it again
  2. The server will generate either a mods or a plugin folder, put the jar file corresponding to your server type in that folder (Go to modrinth.com to download)
  3. Start your server again, this mod will generate a config.yml file for you, open it (the following steps will guide you through configuring it)
  4. Go to the discord development portal discord.com/developers/applications
  5. Click on "New application" A photo of the discord panel when visiting discord.com/developers/applications
  6. Choose a name and accept the user agreement A photo of the discord panel after clicking on "New application"
  7. Use the sidebar to go to the bots section A photo of the discord panel after creating your bot
  8. Click on reset token and click confirm A photo of the discord panel bots section
  9. Copy your bot token and paste it into the botToken field of your config A photo of the config.yaml file
  10. Again in the bots section, scroll down to enable the 'Message content intent' gateway intent A photo of the discord panel bots section with the 'Message content intent' gateway intent enabled
  11. Now use the sidebar to go to installation and configure the following: A photo of the install screen. User install disabled, scopes=bot, permissions=Send messages, Bypass slow mode, Manage roles and Add reactions
  12. Copy the url provided by discord of the previous screen and visit it, you can now invite it to the server you want the bot to send messages to

Now we want to setup the features, you can use the following tutorial to get a channel ID: support.discord.com You can then copy your channel IDs to the features you want to enable in the config (!disable a feature if you do not want to use it!)

Bugs

If you find bugs or weird behavior, please open an issue on github (github.com) or send an email to 93196280+hidde2727@users.noreply.github.com

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:MIT
Опубликован:2 месяца назад
Обновлён:4 недели назад
Главная