링크 : http://forums.bukkit.org/threads/admn-gen-whitelist-v2-1-287.587/
Whitelist
Version: v2.1
This plugin allows only people on your whitelist to join the server.
Features:
* Simple and easy to use
* Whitelist is automatically reloaded when changed outsite of minecraft (e.g. with a texteditor)
* Whitelist supports console commands
* SQL support *new*
* Support for every SQL database, that has a JDBC implementation available *new*
* User-defined table and database layouts supported *new*
Download Whitelist
Source Code
Installation / configuration:
Copy Whitelist.jar in your plugins folder and start your server. The plugin will create new configuration files in plugins\whitelist.
In plugins\whitelist.properties you can set the following options:
* kick-message - The message that will be displayed, when a player is kicked from the server because he is not on the whitelist
* disable-list-command - Disables the /whitelist list command.
* whitelist-admins - A comma separated list of players, who are allowed to modify the whitelist ingame.
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] - Adds a player to the whitelist)
* /whitelist remove [playername] - Removes a player from the whitelist)
* /whitelist on|off - Activates/deactivates the whitelist
* /whitelist list - Lists all whitelisted players
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.
For the following example I will assume you are using a MySQL Database with the following configuration:
* Username: root
* Passwort: fun
* Database name: Bukkit
* Table name: tbl_names with one column named "name"
Because we are using MySQL, we need the MySQL Connector/J. It can be found here. Please read the documentation to understand how to install this probably.
Now that we have the connector up and running, it is time to configure Whitelist. This is done in plugins\whitelist.properties.
1) Activate SQL mode
sql-enable=true
2) Set the correct JDBC driver. Because we are using MySQL in our example we choose:
sql-driver=com.mysql.jdbc.Driver
3) Set the connection string. It depends on the database system and layout used.
In our example it is jdbc:mysql://localhost/Bukkit?user=root&password=fun.
Because we have to escape some characters in *.propertie files, we add:
sql-driver-connection=jdbc\:mysql\://localhost/Bukkit?user\=root&password\=fun
4)We have to specify a query, that will be executed on the given database. If the query's result has at least one element, the user is allowed to access the server. There is a placeholder that will be replaced with the name of the person that is trying to join: <%USERNAME%>.
We add:
sql-query=SELECT name FROM tbl_names WHERE name\='<%USERNAME%>'
5)Optional: If /whitelist add should be available in SQL mode, we have to specify a query for it:
sql-query-add=INSERT INTO tbl_users (Id, Name, Waa, Naaa) VALUES (NULL, '<%USERNAME%>', '1', '2')
6)Optional: If /whitelist remove should be available in SQL mode, we have to specify a query for it:
sql-query-remove=DELETE FROM tbl_users WHERE Name\='<%USERNAME%>'