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.
Hey, I'm slightly new to plugins, and especially permissions, how would I use the permission whitelist.admin on a player?
PS: Sorry if this is a necropost pls dont ban me
Hey, I have a question: Is it possible to use the Plugin with a Google-Forms document, where the answers are written into an Excel-sheet?
So when somebody fills the document and in one question they only write their Minecraft Names, the answers will be written into the Excel-sheet and the plugin gets info, in which column the Name is and the plugin will whitelist the name in the column?
Would be nice 👍
PS: Does the plugin work with paper 1.16?
This plugin also works with 1.13.2.
In reply to kotarobo:
Also works on 1.14.4 :)
guys can u help me ? set up the jdbc?
KickMessage: '&bSorry %NAME%! You are not on the &fwhitelist&b!'
SqlQuery: SELECT user_nicename FROM wp_users WHERE user_nicename='<%USERNAME%>' and
user_activation_key=' ' and user_url<>'http://banned'
SqlQueryList: SELECT user_nicename FROM wp_users
SqlQueryAdd: INSERT INTO tbl_users (name) VALUES ('<%USERNAME%>')
SqlQueryRemove: DELETE FROM tbl_users WHERE Name='<%USERNAME%>'
In reply to Emplehod:
a web and mc.
i have a custom php registration form. so the prob is.. sqldriverconn.. i dont know how should i connect those
In reply to Emplehod:
how should i setup the mysql driver connection.. my web is hosted at x10hosting.
1. The username will not get updated automatically in the database.
2. When you run the remove command just use their new username. The plugin will do a UUID lookup against the new name and then use the UUID to query the database.
In reply to Probdutch:
Very impressed with the SQL database integration; very handy! However, I am a bit confused on a few points while using UUID mode:
1. Once someone is whitelisted to the database, an entry is added with their username, UUID, the operator that executed the whitelisting, and the time-stamp. Now, say that player changes their username; I'm assuming the plugin allows that user back in based upon their UUID (which is fine). What I'm wondering here is whether that entry in the database gets updated with that new username. If that is the case...
2. Are there commands for adding and removing players directly based on their UUID? (ex. "/whitelist removeuuid 85c273c-b9a8-etc,etc,etc...") Maybe I just missed that, but I'm not seeing this right off the bat.
I don't believe it will act like that, you would need some special setup for that to work.
Will this plugin allow none wihtelisted players to join one time and then not allow them to join again until they are whitelisted?
Are you getting any errors in the logs?
Any updates for 1.8.7 for this? the plugin doesn't seem to block people anymore, if they aren't on whitelist. I haven't adjusted anything since 1.8.3 and yet suddenly its stopped working.
Issue resolved everything is running perfectly thank you.
Please try latest dev build. http://h.cnaude.org:8081/job/Whitelist/26/
Any news on 1.8.3 compatability?
[08:09:23] [Server thread/ERROR]: Error occurred while enabling Whitelist v3.5-24 (Is it up to date?) java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/libs/com/google/gson/GsonBuilder at com.cnaude.autowhitelist.AutoWhitelist.loadUUIDWhitelist(AutoWhitelist.java:227) [?:?] at com.cnaude.autowhitelist.AutoWhitelist.onEnable(AutoWhitelist.java:90) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [spigot_server.jar:git-Spigot-870264a-0a645a2] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot_server.jar:git-Spigot-870264a-0a645a2] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot_server.jar:git-Spigot-870264a-0a645a2] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugin(CraftServer.java:356) [spigot_server.jar:git-Spigot-870264a-0a645a2] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.enablePlugins(CraftServer.java:316) [spigot_server.jar:git-Spigot-870264a-0a645a2] at net.minecraft.server.v1_8_R2.MinecraftServer.r(MinecraftServer.java:416) [spigot_server.jar:git-Spigot-870264a-0a645a2] at net.minecraft.server.v1_8_R2.MinecraftServer.k(MinecraftServer.java:382) [spigot_server.jar:git-Spigot-870264a-0a645a2] at net.minecraft.server.v1_8_R2.MinecraftServer.a(MinecraftServer.java:337) [spigot_server.jar:git-Spigot-870264a-0a645a2] at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:257) [spigot_server.jar:git-Spigot-870264a-0a645a2] at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:522) [spigot_server.jar:git-Spigot-870264a-0a645a2] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79] Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.libs.com.google.gson.GsonBuilder at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:91) [spigot_server.jar:git-Spigot-870264a-0a645a2] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) [spigot_server.jar:git-Spigot-870264a-0a645a2] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [?:1.7.0_79] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [?:1.7.0_79] ... 13 more
how to setting my sql ?
There is no importer yet.
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.