DiscordRankSync
This plugin allow you to sync your players in game ranks on discord
Spigot, Bungeecord and Velocity support ✔️
Support discord:
click
Setup:
- Go on the discord developer portal then create a new application.
- Then go in the bot section and get your token. You may have to reset it to get it. Enable Server Members Intent !
-
- Start the server a first time with the plugin to generate the config file
- Set the bot-token value with your token, fill the ranks with you server ranks and complete the sql section.
- Eventually you are ready, start the server and the bot will automatically start
Screenshots:
Discord commands:
- /link <name> -> Start the link process with a minecraft account
- /unlink -> Unlink your discord account
- /discord <name> -> Admin command to get the linked discord account of a minecraft username (by default it's admin only, you can configured it throught the discord server settings)
- /minecraft <@user> -> Admin command to get the linked minecraft account of a discord user
Minecraft commands:
- /link <code> -> Link your minecraft account with the command you get on discord
- /unlink -> Unlink your minecraft account
- /claimboot -> Claim your boost reward if you are boosting the discord server
- /stopbot -> Stop the discord bot, permission: discord.stopbot
PlaceholderAPI:
- %discordranksync_discord% -> Return the discord username of the player
- %discordranksync_is_linked% -> Return true if the player is linked or false if not
- %discordranksync_is_boost% -> Return true if the player is boosting the discord server or false if not
- %discordranksync_discord% and %discordranksync_is_boost% return the message from messages.papi-not-linked if the player is not linked
Default config:
Code (YAML):
# support: https://bebedlastreat.fr/discord
bot-token
:
"token"
guild-id
:
"0000000000000000000"
# id of the discord server the bot should fetch roles
rename
: true
# rename a user to his minecraft name when he links his account
ranks
:
# warning: when a user unlink his account, he will get removed of all configured roles
exemple:
id
:
"0000000000000000000"
# the discord id of the role, need developer mod enabled to get it
permission
:
"group.default"
# the permission the player should have on minecraft
activity:
enable
: false
type
:
"PLAYING"
# PLAYING, STREAMING, LISTENING, WATCHING, COMPETING
message
:
"DiscordRankSync"
# delay for plugin message/placeholder api refresh
refresh-delay
: 30
database
:
"SQLite"
# Currently only MariaDB is supported but I will include later MongoDB support if it is requested (sql is better for use of this plugin)
one-time-reward
: true
# if enabled, reward-command will only be executed once on first time link
reward-command
:
[
]
# command executed when a player links his account (use {player} as placeholder for player name), warning it's a list: ["command1", "command2"]
unlink-command
:
[
]
# command to execute when a player unlink
boost-reward
:
[
]
# command to execute when a player with boost rank execute /claimboost, can be executed every months
boost-delay
: -1
# delay in days to wait before a player can claim his boost reward again, -1 for current month length
join-message-delay
: 0
# delay in ticks (50ms) to send the join message, useful when you have a lobby plugin which send a welcome message
date-format
:
"MM/dd/yy hh:mm aa"
# see https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
# Enable it if you put the jar on your spigot servers and you have it running on your proxy. It will prevent bot start and read plugin messages from the proxy. It's useful for PlaceholderAPI.
# Incompatible with redis bungee
standalone
: false
sql:
ip
:
"127.0.0.1"
port
: 3306
user
:
"root"
password
:
"password"
database
:
"discord"
# database sould already be created
table
:
"discord_sync"
# the table of the table used to store, automatically created
properties
:
"?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8"
driver
:
"com.mysql.jdbc.Driver"
sqlite:
file
:
"discordranksync.db"
table
:
"discord_sync"
driver
:
"org.sqlite.JDBC"
# warning: no legacy color support, you must use minimessage format: https://docs.advntr.dev/minimessage/format.html)
messages:
name
:
"name"
# should not contain a space
ping-command
:
"Get bot latency"
link-command
:
"Link your Minecraft account on the server"
link-command-name
:
"The Minecraft account username you want to link"
unlink-command
:
"Unlink your Discord account from your Minecraft account"
minecraft-command
:
"Get the Minecraft account linked to a Discord account"
minecraft-command-name
:
"The Discord account"
discord-command
:
"Get the Discord account linked to a Minecraft account"
discord-command-name
:
"The Minecraft account username"
no-minecraft
:
"No Minecraft account found for this identifier"
results
:
"Results: "
no-discord
:
"No Discord account found for this username"
error
:
"Error"
already-link-minecraft
:
"This Discord account is already linked to a Minecraft account"
not-online
:
"This player is not online"
already-link-discord
:
"This Minecraft account is already linked to a Discord account"
validation
:
"Validation"
validation-desc
:
"To confirm the link between your Discord and Minecraft accounts, use\n`/link {id}`"
no-link-minecraft
:
"This Discord account is not linked to a Minecraft account"
success
:
"Success"
success-desc
:
"Your Discord account has been successfully unlinked from your Minecraft account"
link-usage
:
"<gradient:#fb0000:#0028fd>Usage: /link <code></gradient>"
you-already-link
:
"<red>Your Minecraft account is already linked to a Discord account.</red>"
link-success
:
"<green>Your Minecraft account has been successfully linked to your Discord account!\nTo receive your Discord roles, simply log out and log back in.</green>"
invalid-code
:
"<rainbow>Invalid code!</rainbow>"
no-link
:
"<red>You haven't attempted to link your Minecraft account to your Discord account in the last 5 minutes.</red>"
not-linked
:
"<red>Your Minecraft account is not linked to a Discord account.</red>"
unlink-success
:
"<green>Your Minecraft account has been successfully unlinked from your Discord account!</green>"
stop-bot
:
"You just stopped the bot!"
join-message
:
""
# a message sent to unlinked players on join, let it empty for no join message
not-boosting
:
"<red>You need to boost our discord server to claim this reward</red>"
boost-countdown
:
"<red>You already claim your reward this month, please wait until {date}</red>"
boost-claim
:
"<green>You successfully claimed your boost reward</green>"
papi-not-linked
:
"Not linked"