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.
Is there a way to import existing standard whitelist.json into the database?
Note to others standard whitelist must be set to false, otherwise it overrides this one.
@YuriT
It's up now.
@YuriT
I'll have the jenkins server back up and running very soon.
Hi. I want to use whitelist in offline mode, but dev build link you were referring to is dead.
Please add a note about the max character length of the kick message.
My friend literally just troubleshot for 2 hours trying to get his message change saved and it turns out the kick message was too long and it appeared that it was completely resetting the config file every time it was loaded.
Hi man :)
Neat plugin man :D
Would it be possible for you to add a feature for temporary whitelists?
Like I could do /tempwhitelist add [user] [time]
That would be amazing :D
Hey there, I use the MySQL function with UUID's. But it keeps telling me every time I make a new Minecraft session, that I'm not whitelist, but I'm registered in the database.
Could you to take a look at that for me please :)
http://gyazo.com/eeb70d16c0c53f9d75cd00332fe949ad http://gyazo.com/fe4d6543082b27cd535dfe98d128b8a3 http://gyazo.com/5e8a69496c5e042611a500e790b4abc7 http://gyazo.com/2fa5578e844cc884e957538e57b2d8cb
@cnaude
Now I think it is working. Thanks :)
@galaipa
Try the latest dev build. http://h.cnaude.org:8081/job/Whitelist/22/
Hi! The UUID support dosn't work in offline mode servers, please could you fix it?
Thanks
@cnaude
Works like a dream now thank you sir. :)
@jenks1999
In your config.yml you will need to set these:
@cnaude
Using that SQL inject i get this error
[21:19:19] [pool-3-thread-9/INFO]: [0;31;1mSQL Error: Field 'uuid' doesn't have a default value[m [21:19:19] [pool-3-thread-9/WARN]: [AutoWhitelist] SQLException: Field 'uuid' doesn't have a default value [21:19:19] [pool-3-thread-9/WARN]: [AutoWhitelist] SQLState: HY000 [21:19:19] [pool-3-thread-9/WARN]: [AutoWhitelist] VendorError: 1364
Please note setting uuid oper time all to null i get this as a result...
http://puu.sh/f4ipN/2adc35ce8e.png
@jenks1999
If you want to use UUIDs you can do something like this.
Or more basic without UUIDs.
@cnaude
where is the information for this?
@jenks1999
Table creation is not automatic. You will need to create the table first.
@cnaude
[12:14:27] [Server thread/INFO]: [AutoWhitelist] Whitelist is ON
[12:14:27] [Server thread/INFO]: [AutoWhitelist] Creating whitelist.json
[12:14:27] [Server thread/INFO]: [AutoWhitelist] Done.
[12:14:29] [Server thread/INFO]: [AutoWhitelist] Converting whitelist.txt to whitelist.json
[12:14:29] [Server thread/INFO]: [AutoWhitelist] Watching whitelist.json for changes...
UUID mode still sends to json and not sql if sql is true.
SQL should overide UUID and convert data to sql.
[12:35:51] [Server thread/INFO]: [0;31;1mSQL Error: Table 'mcnext.tbl_users' doesn't exist[m
[12:35:51] [Server thread/WARN]: [AutoWhitelist] SQLException: Table 'mcnext.tbl_users' doesn't exist
[12:35:51] [Server thread/WARN]: [AutoWhitelist] SQLState: 42S02
[12:35:51] [Server thread/WARN]: [AutoWhitelist] VendorError: 1146
[12:35:51] [Server thread/INFO]: [AutoWhitelist] Kicking player: jenks1999
seems that the plugin doesnt create tables or checks them.
Hi there, Me and my friend are using your plugin to better our server. The one issue I'm having is that I can't figure out how to set permissions so that people can use our warp plugins.
@DonGrif
Latest dev build supports uuid mode for sql connections. http://h.cnaude.org:8081/job/Whitelist/20/
See examples in config.yml. https://github.com/cnaude/Whitelist/blob/master/src/main/resources/config.yml
@cnaude
It will be a very great feature to have a list of players who have tryed entering the server when they weren't whitelisted.