A Discord verification authentication plugin for Minecraft servers (Paper 1.21+) by theTWIXhunter. Links player accounts to Discord via DM verification codes or allows password-based authentication.
- Discord Verification: Players verify by entering their Discord User ID and receiving a 4-digit code via bot DM
- Backup Password System: Set backup passwords for when Discord access is lost
- Password-Only Mode: Allow registration with just a password (no Discord required)
- Multi-Language Support: Built-in support for multiple languages (English UK, Dutch Belgium)
- Smart Authentication Skip: Skip login for premium accounts or matching IPs (configurable)
- Account Management: Players can unlink Discord accounts, logout, and manage passwords
- Security Options:
- Max accounts per Discord account limit
- Verification timeout
- Force authentication for OPs/specific permissions
- Experimental Features:
- Discord role sync (grant Minecraft permissions based on Discord roles)
- DiscordSRV compatibility mode
/discordauth <reload|unlink|logout>- Main command (aliases:/dauth)reload- Reload the plugin configuration (admin)unlink [player]- Unlink Discord accountlogout [player]- Logout from verification session
/password <set|change|forgot>- Manage backup passwords (aliases:/pw,/passwd)/logout [player]- Quick logout command/unlink [player]- Quick unlink command
discordauth.use- Allows use of basic commands (default: true)discordauth.admin- Allows use of admin commands (default: op)discordauth.force.login- Force players with this permission to always authenticate
Edit config.yml to customize the plugin:
server-name: Server name shown in Discord messagesdiscord-invite: Discord invite link (shown when DMs fail)max-accounts-per-discord: Maximum Minecraft accounts per Discord account (0 = unlimited)language: Language file to use (en-uk, nl-be)verification-timeout: Timeout in seconds before kicking unverified players (0 to disable)
- Discord registration is always available.
- Password registration and backup password access are controlled under the Authentication Skip Rules section.
default-mode: Fallback mode used when a player does not match any grouppassword-feature-default: Fallback password access mode used when a player does not match any groupoperators: Control how operators are handled, or set todisabledto ignore the groupoperators-password-feature: Password access for operators (discord,password,both,disabled)known-ip: Control how players with a matching last IP are handled, or set todisabledto ignore the groupknown-ip-password-feature: Password access for players with a matching last IP (discord,password,both,disabled)specific-players: Per-player overrides usingname,mode, andpassword-featurebedrock-players: Control how Floodgate/Geyser players are handled, or set todisabledto ignore the groupbedrock-players-password-feature: Password access for Bedrock players (discord,password,both,disabled)premium-users: Control how premium Java players are handled, or set todisabledto ignore the grouppremium-users-password-feature: Password access for premium Java players (discord,password,both,disabled)
discord-role-sync: Sync Discord roles to Minecraft permissionsdiscordsrv-compatibility: Import accounts from DiscordSRV
-
Create a Discord Bot
- Go to Discord Developer Portal
- Create a new application
- Add a bot and copy the bot token
- Enable these Privileged Gateway Intents:
- Server Members Intent
- Message Content Intent
-
Configure the Plugin
- Edit
plugins/DiscordAuth/bot-token.yml - Replace
PUT_YOUR_BOT_TOKEN_HEREwith your bot token - Edit
plugins/DiscordAuth/config.ymlto your preferences - Set your
server-nameanddiscord-invitelink
- Edit
-
Invite the Bot
- Use your bot's OAuth2 URL with these scopes:
bot - Required permissions: Send Messages, Read Messages, Embed Links
- Use your bot's OAuth2 URL with these scopes:
For detailed setup instructions, visit: https://thetwixhunter.nekoweb.org/discordauth/guides/initial-setup.html
Run mvn clean package to build the plugin. The compiled JAR will be in the target folder.
- Build the plugin or download the JAR
- Place the JAR in your server's
pluginsfolder - Restart the server
- Follow the Initial Setup guide above
- Configure
plugins/DiscordAuth/bot-token.ymlandconfig.yml - Reload or restart the server
- Player joins the server
- Plugin prompts for Discord User ID or password setup
- If Discord: Bot sends 4-digit code via DM → Player enters code
- If password-only: Player sets a password
- Account is registered and player can join
- Player joins the server
- If skip rules apply (premium/IP match), player joins immediately
- Otherwise, player must verify with Discord code or password
- After verification, player can join
theTWIXhunter
1.1.0 - Paper 1.21+