Minecraft: Java Edition - Discord Whitelist Bot (RCON Version)
Run an invite-only community and want to give your community members access to a private Minecraft: Java Edition server?
This bot is exactly what you need to do just that!
Using this bot, Discord members can use the
/whitelist command inside Discord to whitelist their Minecraft account on your server.
Each member can only whitelist one account, and the bot will prevent two members whitelisting the same account.
This app supports all Vanilla, Spigot and Paper servers running most Minecraft versions. If you use a custom whitelist plugin, you might need to modify the code which checks if the account is already whitelisted.
Before installing this app, you'll need to ensure RCON is enabled on your Minecraft server. You can do this by setting
true inside your
server.properties file. You should also set
rcon.password. The way you'll do this will vary depending on your hosting provider, but check out this example guide from Shockbyte to get a general idea of what you need to do.
Once you've enabled RCON you're ready to setup your bot!
- Install this app using the green
Install Free button above.
- Choose your app's name, then click
- Follow the instructions to link your Discord bot to this app. If this is your first time connecting a Discord bot, you'll need to set one up. Then click
- Set the following environment variables:
Rcon Hostname - set to the IP address (without port) that players connect to your server with.
Rcon Port - set this to whatever
rcon.port is set to in your
server.properties file. By default, it's
25575. This is not the same port that players connect to your server with.
Rcon Password- set this to whatever
rcon.password is set to in your
Kv Prefix - we use Autocode's key-value store to remember who has already whitelisted an account. If you're running multiple instances of this bot on the same account you should use a different KV prefix for each one. If you're only running one instance, we recommend using
MC_WHITELIST as your prefix.
Install App and wait for Autocode to work it's magic
- Once your app is installed, head over to your Discord server and type
!registerwhitelistcommands in a channel your bot has access to.
Congratulations! Your server should now have a
- I use a custom Minecraft whitelist plugin. Will this work for me?
- Yes, but you might need to change a small bit of code on
line 78 if your plugin changes the message sent to the console when the player is already whitelisted.
- Will this work for large Discord/Minecraft servers?
- Yes, but if you run a really big server then you'll likely want to rework this code to use something like a MySQL database to store your whitelisted player data.
- Can I modify/customise this code?