Rank sync - Norbit4/DiscordMc GitHub Wiki

How to enable rank sync?

Rank synchronization has been divided into two modules. The first module is responsible for synchronizing permissions from the mc server with the discord server roles. The second is responsible for synchronizing discord server roles with permissions from the minecraft server.

NOTE: it is not recommended to configure the same roles/permissions in both modules. This can lead to errors and bugs!

The roles and permissions of synchronized users who are online on the minecraft server reset automatically every 30 minutes!

IMPORTANT! Read before you start!

  • Set the bot above the ranks, the bot cannot add ranks to users that are lower in the hierarchy than its rank:

image

  • How to get discord role id?

image

First module - Sync mc perms with discord roles

How to start?

  1. Set "sync-mc-permissions-enable" to true

  2. Add id to "sync-roles" and add custom permission

sync-mc-permissions:
  - 'custom-rank-permission:copied-rank-id'
  • example:
sync-mc-permissions:
  - 'rank.owner:823275796260875763'
  - 'rank.vip:723255796651075710'
  - 'rank.default:923255726261875745'
  • Add custom permission to your permission plugin

  • [Optional] Set "sync-name" to true

note: nick sync does not work for the discord server owner, it is specific to discord servers!

If this option is enable: The minecraft username is set for the discord user

  • That's all!

note: if player has 2 permission, plugin sync the rank in top the list!

ex: config.yml:

sync-roles:

  • 'rank.owner:823275796260875763'
  • 'rank.vip:723255796651075710'
  • 'rank.default:923255726261875745'

player has permissions:

  • rank.owner
  • rank.vip

The rank to be added: Owner

Second module - Sync discord roles with minecraft perms!

How to start?

  1. Set "sync-discord-roles:" to true

  2. Add role id to "sync-discord-roles" and add custom permission

sync-mc-permissions:
  - 'custom-permission:copied-rank-id'
  • example:
sync-discord-roles:
  - 'disord.boster:823275796260875763'
  - 'discord.18:723255796651075710'
  1. Add executed commands to your plugin with permissions, LuckPerms commands are entered by default:
 command-to-sync-permission: 'lp user {PLAYER} perm set {PERM}'
 command-to-un-sync-permission: 'lp user {PLAYER} perm unset {PERM}'
  • After detecting the role, the plugin will execute the permission command!

  • That's all!

note: all roles sync with all permissions

ex: config.yml:

sync-discord-roles:

  • 'discord.boster:623275796260875763'
  • 'discord.18:123255796651075710'

user has roles with id:

  • 623275796260875763
  • 123255796651075710

Permissions will be added:

  • discord.boster
  • discord.18