This is a continuation of the Whitelist plugin originally written by Silencium20. This plugin will automatically reload your whitelist when players are added to the whitelist file. This plugin will connect to Mojang servers for UUID lookups.
- AutoWhitelist is automatically reloaded when changed outside of Minecraft (e.g. with a text editor)
- AutoWhitelist supports console commands
- SQL support
- Support for every SQL database that has a JDBC implementation available
- User-defined table and database layouts supported
- Ampersand color codes in the kick message. (&4 = red etc...)
- UUID support.
How to install
- In your server.properties file set whitelist to false.
- Drop the jar file in your plugins directory and restart your server.
Commands: These commands can be used by Ops ingame or in the server console. When used with the server console don't type '/' before the command.
- /whitelist help - Shows the help ;-)
- /whitelist reload - Reloads the whitelist and it's settings
- /whitelist add [playername(s)] - Adds a player to the whitelist)
- /whitelist info [playername] - Display information about a player
- /whitelist remove [playername(s)] - Removes a player from the whitelist)
- /whitelist on|off - Activates/deactivates the whitelist
- /whitelist list - Lists all whitelisted players (from txt file)
- /whitelist dblist - Lists all whitelisted players (from DB)
- /whitelist dbdump - Dumps users from database to whitelist.txt file
- whitelist.admin - Gives players access to any of the /whitelist commands.
- whitelist.[command] - Gives players access to specific commands.
To support as many different database configurations as possible, Whitelist sets flexibility over simplicity. This way virtually every existing database can be used as a base for authentification.
The plugin will not automatically create tables for you. Below are a couple examples to get you started.
If you want to use UUIDs you can do something like this.
CREATE TABLE IF NOT EXISTS `tbl_users` ( `name` varchar(256) NOT NULL, `uuid` varchar(256) NOT NULL, `oper` varchar(256) NOT NULL, `time` varchar(256) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Or more basic without UUIDs.
CREATE TABLE IF NOT EXISTS `tbl_users` ( `name` varchar(256) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
If you want to use MySQL, you might need the MySQL Connector/J. It can be found here.
- Add DB reconnect logic.
- Update for MC 1.10.2.
- Info command should always respond.
- v3.5-26 - May 7, 2015
- Update for MC 1.8.3.
- v3.5-24 - February 20, 2015
- Don't allow null uuid when adding players.
- Automatically remove players with null uuid from json.
- NPE fixes.
- v3.5-22 - February 14, 2015
- Add support for offline mode.
- v3.5-20 - January 26, 2014
- Add support for UUID in SQL mode.
- v3.5-17 - September 1, 2014
- Fix player add message.
- Fix remove command.
- Make commands more verbose.
- v3.5-15 - August 27, 2014
- Add UUID support (whitelist.json)
- v3.4 - May 15, 2014
- Add %NAME% token for kick message.
- v3.3 - March 27, 2013
- Add dbdump command.
- v3.2 - October 11, 2012
- Changed from whitelist.properties to config.yml
- Fixed the list command
- Added dblist command
- v2.7b - June 15, 2012
- Added color code support. Use ampersand color codes in the kick message.
- v2.7a - June 12, 2012
- Initial version.
- Added support for CB 1.2.3-R0.1 and higher.
Glad to hear it's working for you. :)
Oh god I'm an idiot... I actually did already use that version, but simply copied in the old config text, freaking smart! :-)
Thanks a bunch for helping out, it's all working now!
Please try my new version. https://dl.dropbox.com/u/30679730/dist/Whitelist.jar http://dev.bukkit.org/server-mods/autowhitelist/pages/v3-x/
It uses a config.yml which is easier to configure and does not require escaping special characters.
Every time I start the plugins, it tells me: http://pastebin.com/52fdjxtC
This is my connection string;
Hope you can tell me what's wrong! :)
(And I did set up the table and colloumn)
Thanks :D I love the plugin it is easy and simple to use.
I'm rewriting large portions of this plugin. Preview: http://dev.bukkit.org/server-mods/autowhitelist/pages/v3-x/ Snapshot: https://dl.dropbox.com/u/30679730/dist/Whitelist.jar
I will fix this. I use this plugin on my server so I will continue to keep this updated.
Is this plugin going to be updated, when you type /whitelist list it says that the command has been disabled and you can not view the list.
If someone's name is under the admins in the config file, do they still need to be OP to whitelist people? Can OPs whitelist people without being on that list? :S
Cool, I guess it was a good idea :)
MCBans and MCBouncer already do this.
Many thanks for your plugin. I am actually getting some real work done on my server. Haven't opened it as yet. Tried to get a couple of players to help but they bailed on me. You are always welcome on XTC Minecraft (You can test your plugin):
I was thinking of something since this is a security-related plugin. I was wondering if anyone has tried to create a "Ban Central" plugin. What I envision would be a plugin that monitors the blacklists on any server running the plugin. This would probably link to a certain URL that keeps the central blacklist and whenever a person is banned, it would communicate with Ban Central and all the servers with the plugin would automatically have those players banned too. Similar to the PunkBuster thing. Since it would be totally voluntary for each server, it shouldn't be an issue.
This may seem harsh to some but I really hate griefers. I actually had two morons pop up on my TeamSpeak server and immediately asked if they could grief my server when it opened.
Glad to hear it's working for you. Now I just have to cleanup the code a little. I'll add a debug option to hide the stuff that's printing to the console on startup.
The permissions suggestion sounds interesting. I'm actually looking to do something like that for my current server. I'll have to think about it.
Seems to be working as intended. I was curious if the ban lists would take precedence over everything, so I tested it. Seems that they do. Good job!
Now that you have nothing to do :) I will make this suggestion for a more-encompassing plugin: Not only could you manipulate the whitelist automatically, but you could have the option to set the player's group based on MySQL. So anyone might be able to connect, but might not have building rights (group default). Registering would put them in group Builder. Yes, I think there's a plugin that may do this already, but then yours would have a distinctive advantage.
Hey, you might call it "Whitelist Groupie"!
Okay try the latest version from my dropbox link. I changed some of the logic. It now checks the whitelist.txt first and then falls back to check the database. The add command will add users to the txt file if the add query is missing. The same goes for the remove command.
I did it before you made the post, but like this:
sql-query=SELECT user_nicename FROM wp_users WHERE user_nicename\='<%USERNAME%>' and user_activation_key\=' '
The way you had it didn't work. It just got chopped off in the console to:
sql-query=SELECT user_nicename FROM wp_users
But it is working, so this is fantastic! Any ideas about the "add" command?
If the value is empty only after they have successfully verified then use this. Basically it searches for a row matching the user and only returns a success if the user_activation_key is empty.
I have noticed that user_activation_key has a value if they have not verified and is empty for people that have. I'd figure I could do this in your first example, but exactly how should it read to include them only if the value is empty?
1) Currently there does not appear to be a way to get multiple lines in the kick message. I've tried different things but so far nothing has worked. If you notice another plugin that does this let me know.
2) This should be possible. You need to figure out which column contains their registration status. Maybe user_activation_key or user_status. Or some other field that gets updated or can be updated after successful registration.
Then create SELECT statement that looks like this:
or just make them set a URL
No need to donate to me. I really don't play many games. :)
Okay, I am officially a dummy because I apparently overwrote that line with the last one you gave me, the one for listing the database. I put it back and it is working! I've tested it on three accounts and they are all connecting if they are registered. Then I removed one from the website and they couldn't connect.
This is great! This is a great plugin. Thank you so much for making this work. I may finally be able to open my server soon.
If you have a Steam account, I would like to give you some games for helping me. Look me up under the same name and tell me who you are. I have these for you. They may be on sale now but usually costs about $23. Not BF3 but pretty fun gaming.
Includes 3 items: Renegade Ops, Renegade Ops - Coldstrike Campaign, Renegade Ops - Reinforcement Pack
Almost perfect. Two things:
1) Can I get more than one line in the kick message? I need about three. How can I format this?
2) Any way around the fact that WP is adding new users to the database before the user has confirmed registration via email? Right now, they only have to register and are instantly on the whitelist with never having to confirm. This means they could put a bogus email in :(
It still appears that I still can't add a player with the 'whitelist add' command. This is not as big a deal as long as the site registration is working, but would be nice.