Skip to content

Account linking

Cyrusbye720 edited this page Jun 6, 2026 · 3 revisions

Account linking

Players can prove that a Minecraft account and a Discord account are controlled by the same person. Codes are six characters, valid for five minutes, and may only be used once.

Flow

  1. The player runs /zdiscord link in Minecraft. The plugin generates a code and shows it in chat.
  2. The player runs /link <code> in Discord (a slash command). The plugin matches the code, persists the link, and applies any rewards.
  3. The player receives a confirmation message in both Minecraft and Discord.

Configuration

linking:
  enabled: true
  required: false
  linked-role: "123456789012345678"
  rewards:
    - "give %player% diamond 5"

linking.required

If true, players who are not linked are kicked from the server at login. The kick message is link-required in messages.yml. Players with the zdiscord.bypass.link permission (op by default) are exempt.

linking.linked-role

The Discord role ID to grant to a user after they link. Leave empty to skip role grants.

linking.rewards

A list of console commands run on the main thread after a successful link. Placeholders like %player% and %displayname% are resolved against the player object.

Unlinking

LinkModule.unlink(UUID) is exposed for plugin integrations; there is no in-game or slash command to unlink by default.


ZDiscord v1.1.0 · Home · Issues · Source

Clone this wiki locally