Sueta

DiscordID | Whitelist & 2FA

2.1.2

Effortless, Discord-powered whitelisting and session security for Minecraft.

·Plugin

DiscordID

Put your whitelist on autopilot. DiscordID seamlessly connects Discord accounts to Minecraft Java & Bedrock profiles, allowing your community members to verify and join on their own. Zero wait times or admin overhead.

Powered by an optimized asynchronous architecture, join checks typically take less than 20ms, keeping connections instant and lag-free. Managing your server is just as fast, featuring an in-game interactive setup and intuitive GUI menus right at your fingertips.

Features
Link in Seconds

  • Guild Verification: Only allow players who are members of a specific Discord server to join.
  • Online Roles: Assign an online role to players while they are connected to the Minecraft server.
  • Seamless Linking: Players can connect to the server, enter the /link command on Discord, and be allowed in without having to reconnect.
  • Interactive Setup: Easily set up the bot and link your Discord server right from in-game using /discord setup.
  • In-Game Menus: View linked players and manage your integrations using elegant in-game GUIs.
  • Secure Sessions (Optional): Require players to verify login attempts from unknown IP addresses via Discord DM. This effectively prevents impersonation on cracked servers.
  • Update Notifications: Notifies you when a new version of DiscordID is available on Modrinth.
  • Automatic Migration: DiscordID automatically migrates your old links and configuration to the new format and creates a backup so you can easily roll back if needed.
  • Floodgate Support: Experimental compatibility with Floodgate (Geyser) for Bedrock players.

How it Works

When an unlinked player attempts to join the Minecraft server, their connection is blocked and they are shown a screen with a 4-character verification code. The player must then go to your Discord server and run the /link <code> command.

Once executed, their Minecraft profile is linked to their Discord account, and they are immediately allowed onto the server without needing to reconnect.


Installation

⚙️ Discord Bot Setup

You need to create a dedicated Discord application for DiscordID to function.

  1. Go to the Discord Developer Portal and click New Application.
  2. Navigate to the Bot tab in the left sidebar.
  3. CRITICAL: Scroll down to Privileged Gateway Intents and enable the Server Members Intent. If this is off, DiscordID cannot check if users are in your server or assign roles.
  4. Click Reset Token to get your bot token. Copy this and paste it into the discordToken field in your config.yml.
  5. Navigate to OAuth2 -> URL Generator.
  6. Under Scopes, select bot.
  7. Under Bot Permissions, select Manage Roles (this is strictly required if you want the bot to assign online roles or require specific roles to join).
  8. Copy the generated URL at the bottom, paste it into your browser, and authorize the bot to join your server.
  9. Get your server's ID by right-clicking your server icon (requires Developer Mode enabled in Discord) and selecting "Copy Server ID". Paste this into guildID in your config.
  10. Role Hierarchy: If you use the online role feature, open your Discord Server Settings -> Roles, and drag your Bot's role above the online role you want it to assign.

Usage

Commands & Permissions

Discord Commands

  • /link <code> -> Links your Discord account to a Minecraft profile using the verification code.
  • /link -> Displays the connected Minecraft profile(s) for the server.
  • /unlink -> Unlinks your profile. If multiple profiles are linked, a dropdown will appear.
  • /unlink <profile> -> Unlinks a specific profile by its name or UUID.

Minecraft Commands (Player)

  • /discord -> Shows information about your current link.
  • /discord unlink -> Unlinks the current profile from its Discord account. (Default Permission: did.unlink)

Minecraft Commands (Admin)

  • /discord list -> Shows all links on this server. (Permission: did.manage)
  • /discord unlink <profile> -> Unlinks a specific profile. (Permission: did.manage.unlink)
  • /discord link <profile> <account> -> Link a specific profile by name/UUID to a specific Discord account by name/ID. (Permission: did.manage.link)
  • /discord setup -> Interactive setup menu for configuring the Discord bot and guild. (Permission: did.manage.setup)
  • /discord rules -> Shows which join rules are currently active. (Permission: did.manage.rules)
  • /discord cleanup -> Cleans up stale links. (Permission: did.manage.cleanup)
  • /discord reload -> Reloads the config and restarts the bot. (Permission: did.manage.reload)
  • /discord bypass -> Shows information about bypassed players. (Permission: did.manage.bypass)
  • /discord bypass <on/off> -> Enabled or disabled bypass. (Permission: did.manage.bypass.toggle)
  • /discord bypass add <player> -> Adds a player to the bypass list. (Permission: did.manage.bypass.add)
  • /discord bypass remove <player> -> Removes a player from the bypass list. (Permission: did.manage.bypass.remove)

Configuration

Authentication

  • discordToken: Your Discord bot token from the Developer Portal.
  • guildID: The ID of your Discord server.

Join Rules

  • requireLinked: Enforces the plugin. Only profiles linked to a Discord account are allowed to join.
  • requireMember: Only members of the configured guildID are allowed to join.
  • alwaysAllowWhitelisted: Players on the server's vanilla whitelist bypass ALL DiscordID requirements - linking, guild membership, and role checks included. Only enable this if you understand that whitelisted players skip Discord verification entirely.
  • alwaysAllowOperators: Server Operators bypass all DiscordID requirements.
  • showLinkedMsg: Shows a message to the player upon joining detailing which Discord account they are linked to.
  • allowMultiLink: Allows one Discord account to link to multiple Minecraft profiles.
  • allowJavaBedrockLink: Allows one Discord account to link to exactly one Java and one Bedrock profile.
  • allowMultiSession: Allows multiple profiles linked to the same Discord account to be online simultaneously.
  • enforceSessionAuthorization: Players joining from a new IP address must authorize the session via Discord DM.
  • sessionDuration: Time in minutes before a player has to re-authenticate an IP session.

Discord

  • assignOnlineRole: Enables assigning a Discord role to players while they are online.
  • onlineRoleId: The Discord Role ID to assign. Your Bot's role must be above this role on Discord.
  • requireDiscordRole: Requires users to have a specific Discord role to join the Minecraft server. (Set to 0 to disable).

Bypass

  • allowBypass: Enables the bypass list.

Credits

  • Fruxz for writing many of the core libraries DiscordID runs on.
  • MCHeads for providing the Minecraft avatars used in Discord interactions.

Similar projects

Plugin →