Sueta

BCraftBot

1.1

Discord-based whitlelist system. Designed with Twitch streamers in mind!

·Plugin

ABOUT


BCraftBot is a Discord-based whitelisting plugin designed to help Discord server owners restrict access to Minecraft servers to members of a Discord Server or to members with a specific role in the Discord server.

This plugin was created out of personal need, and as such was created with Twitch streamers in mind (although there are other uses for the plugin outside of Twitch). BCraftBot can be used to take advantage of Discord's Twitch integration to restrict Minecraft server access to Twitch subscribers. The plugin includes exemption list functionality, so you can list people who are immune to the verification in the config. Everything is designed to make the user experience as streamlined as possible, unlike other Twitch integration plugins. Because this is designed to be interacted with in Discord servers, this does not need to be connected to a Twitch account at all.

This plugin can work on multiple servers, but is not designed to run as a BungeeCord plugin. It needs to be installed and configured on each individual server if you plan to use it on a BungeeCord network. The benefit of this sort of setup allows network owners to set different join requirements for each server in the network.

COMMANDS

The plugin has one Minecraft-side command and one Discord-side command.

On the Minecraft server, you can run the command /addexempt <username> to add a user to the exemption list. The permission bcraftbot.addexempt is needed to be able to run this command in game. Alternatively, you can give users the permission node bcraftbot.bypasscheck to exempt them from the check.

On the Discord server, players can run !addme <minecraft name> to add their Minecraft account to the records. Once they login to the server the first time, the plugin will make note of the UUID so that it can allow the user to join and update the records, should they change their username.

CONFIG

Host: 0.0.0.0 
Port: '3306' 
User: username 
Password: 'pass12345' 
Database: dbname 
TableName: bcraftbot 
Bot-Token: <Insert your bot token here. You will need to set up the bot user yourself> 
CheckRole: true 
RequiredRole: Allowed,Mod,Admin 
ExemptUsernames: test1,test2,test3 
KickMessage: 'You are either not a member of the Discord or have not yet verified your account!' 
AssignRole: true 
RoleName: Craftee 
OutputToDiscord: true 
MainRecordKeeper: true

If CheckRole is true, users will need the Discord role listed in RequiredRole to join the server. You can specify multiple roles in RequiredRole that are allowed to join the server. As long as the user joining has at least one of those roles, they will be allowed to join. AssignRole tells the bot whether or not it should give users the role specified in RoleName upon joining the server. If you wish to limit the bot commands to a specific channel, edit its permissions accordingly. OutputToDiscord determines whether or not the bot is allowed to post messages in Discord chat. MainRecordKeeper determines whether or not the bot is allowed to create new SQL entries. That way, if you are using this on more than one server all sharing the same database, you can have only one creating entries to avoid SQL errors.

You will need to set up your own bot user on Discord. After you generate the config and put in all the necessary information, the plugin will give you a link to add your bot to your Discord server on startup. It is strongly recommended you set up a new bot user for every server you use this on.

Similar projects

Plugin →