AutoWhitelist
About AutoWhitelist
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.
Features
- 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
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
Permissions
- whitelist.admin - Gives players access to any of the /whitelist commands.
- whitelist.[command] - Gives players access to specific commands.
Basic Configuration
See config.yml
SQL Configuration
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.
Table Creation
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;
Dependencies
If you want to use MySQL, you might need the MySQL Connector/J. It can be found here.
Source
https://github.com/cnaude/Whitelist
Change Log
- v3.5-32
- 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.
Hello, again! I helped (and you helped me) get this working some time ago with a WordPress website. Well, I'm back again and trying to get it working and see some things have changed.
I have it working 95% of how I need it: A user must be registered in WordPress to be in the white list, however, I want to enforce that they have actually activated their account instead of just registering. Right now, it allows them without activation. I had this working before, but can't quite get it now.
To do it before, I was doing an SqlQuery like:
SqlQuery: SELECT user_nicename FROM mc_users WHERE user_nicename='<%USERNAME%>' and user_activation_key=' '
But before, there was an activation key in that value until their account was activated, then it disappeared. I think that's the key to my problem.
@martymeep
Yes.
Will it work in 1.6.2 even though it is the 1.5.2 build that you download?
Hey, I was wondering if anyone could post a quick form of PhP or JavaScript to write to the SQL database? I'm not the best with website coding. This would be much help, thank you.
This works well, apart from when my server restarts, the whitelist automatically is set to "on", even if it is switched off before the restart. I take it this should not be happening? How can I correct this? Thanks.
@bartdaniels
Oh never mind, had to turn off whitelist on the server and turn on whitelist in the plugin
Hi,
How come the plugin doesn't write to the bukkit whitelist.txt? Also if the player is added to the database, they still get the message they aren't whitelisted. As if it doesn't check the database when a user is logging in.
I get no errors in the console.
Cheers
@konesmeijer
Not sure if you're still having this problem, but from the screen you showed, it appears as if access is being denied to your user. I had this problem for a second, as well, before I realized that, in the config file, you're asked for your password, before your username. I flipped them, as well. =p
@cnaude
Alright I'll try that thanks for your help
@konesmeijer
I think your mysql lib is okay. It looks like you just need to add the correct queries.
!' SqlEnable: true SqlDriver: com.mysql.jdbc.Driver SqlDriverConnection: jdbc:mysql://195.8.208.--/3351/users SqlPass: SqlUser: SqlQuery: SELECT name FROM tbl_names WHERE name='<%USERNAME%>' SqlQueryList: SELECT name FROM tbl_names SqlQueryAdd: INSERT INTO tbl_users (name) VALUES ('<%USERNAME%>') SqlQueryRemove: DELETE FROM tbl_users WHERE Name='<%USERNAME%>' SqlDriverJar: lib/mysql-connector-java-bin.jar DebugMode: trueI did not select the querys etc yet, but that isn't necesarry for this problem right? Thanks
@konesmeijer
Please pastebin your config.yml. Remove the username and password. Also enable debug mode in the config and send me the output.
My console says, accces denied for user.... (using password YES) Please help
@rolecraft
There does not appear to be a way to do that without a client mod.
@konesmeijer
What version of Java are you running?
What does this line look like in your config.yml? SqlDriverJar:
I have noticed that some versions of Java actually contain the mysql driver so that a separate jar is not needed.
@cnaude
I put in the j connector next to craftbukkit.jar and I filled out my stuff in the properties and it doesnt work...
Might be a stupid question, but would it be possible if you get kicked and you get a LINK from the server to register at, to make that link clickable?
Thanks in advance, if not possible - please try to make it possible, would be quite usefull.
@konesmeijer
What have you tried so far?
Please help me how do I install jbdc driver etc, I have a remote database please help!
Please help me how do I install jbdc driver etc, I have a remote database please help!