Inactive [ADMN/GEN] Whitelist v2.7 [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Silence, Jan 15, 2011.

     
  1. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Whitelist
    Version: v2.7

    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
    • Support for every SQL database, that has a JDBC implementation available
    • User-defined table and database layouts supported
    Download Whitelist
    Source Code
    Donate

    Changelog:
    Version 2.7
    • Fixed SQL injections with malformed player names (thanks to Uroz for reporting!)
    Version 2.6
    • Fixed null ptr exception introduced with 2.5
    Version 2.5
    • (Possible) fix for some SQL related errors
    Version 2.4
    • Improved SQL connector handling with new settings directive
    Version 2.3
    • Fixed an unhandled exception (thx to Puremin0rez for reporting!)
    Version 2.2
    • Removed TSLPC
    • Support for build #415
    Version 2.1
    • Add/Remove commands are working in SQL mode now
    Version 2.0
    • Added SQL support
    • Minor fixes
    Version 1.9
    • Support for build #287
    Version 1.8
    • Fixed fix for non working permissions.
    Version 1.7
    • Fixed non working permissions (thanks to Kainzo for reporting!)
    Version 1.6
    • Support for Bukkit #186 (also confirmed to work with #230)
    Version 1.5
    • Fixed a null pointer error.
    Roadmap:
    • Add permissions, once implemented in Bukkit
    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.

    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%>'

    Help, I get a 'class not found error'
    Put the following line in your whitelist.properties file: sql-driver-jar={path to the connector}
    The base path is the directory your craftbukkit.jar is placed in, so if you have named the connector "mysql-connector.jar" and placed it in the same directory as craftbukkit.jar you would add
    sql-driver-jar=mysql-connector.jar

    I need more informations!
    There is a very nice written guide by MrDylan (thx!) on using Whitelist and MySQL with SMF boards, get it here.
    Thats all!
    Grovert11, MaMaxGER, DannyDog and 2 others like this.
  2.  
  3. Offline

    Mcbibbles

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No, i never get a .jar file at anypoint from the download
  4. Offline

    Wovl21

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    When you download the file on page 1 you get a ZIP.
    That ZIP does not contain any JAR file. Whitelist_1.1.zip
    Extracted is a Whitelist folder.
    Here is the breakdown.
    Whitelist_1.1.zip
    • Whitelist (folder)
      • com (folder)
        • bukkit (folder)
          • silence (folder)
            • whitelist (folder)
              • Whitelist.class
              • WLBlockListener.class
              • WLPlayerListener.class
      • META-INF (folder)
        • MANIFEST.MF
      • plugin.yml
    There is no .JAR file anywhere in the ZIP.
  5. Offline

    Mcbibbles

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    thanks for explaining this, but it doesn't really help me
  6. Offline

    hyperch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    can you whitelist anyone from the server console?
  7. Offline

    tekac

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    FYI. I have this working with #66. No problems.
  8. Offline

    Wovl21

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I mean I have the same issue... lol I don't see a jar file so I don't know how it works.
  9. Offline

    ddoolin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hm, not sure how. My CBukkit is reading the whitelist file, but it's not actually applying it. I add myself to the list and it says I'm not listed. Yes, I was case-sensitive.
  10. Offline

    Kainzo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    opposite server types? hmm - we're wanting to simulate a hardcore experience but in the fashion of a "Hero" theme.
    I'd like to say we're vanilla .. but the only thing we want from vanilla is how hard it is :)
  11. Offline

    maxsteele

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thank you for this whitelist plugin! I am implementing this on my vanilla server while waiting for the official release of craftbukkit.

    I have two requests:

    First, every person who hits the whitelist generates a "<user> joined the game" "<user> left the game."

    We get a lot of people hitting our whitelist and it really causes quite a bit of spam. Is there a way to prevent these people from hitting the server at all? These messages didn't make it through with the previous whitelist used.

    Second, I'd like to see the commands for the plugin available on the console. I can't always be in-game and I'd like the ability to add people to the whitelist and reload the plugin from the console.

    Thanks again for the great plugin!
  12. Offline

    DjDCH

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Silence, you forgot to add event.setCancelled(true); at the end of your public void onPlayerJoin(PlayerEvent event) statement. That should resolve this. And by the way, I think you will no longer need to kick the player since he never log in to the server.
  13. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @DjDCH: I did not, PlayerEvent does not implement Cancellable in B47, does it in B49?

    Edit: Yeah, PlayerEvent is not cancellable even in B49.
    I'm not sure if it would make much sense to cancel connect -> With 'kick' the connection with the client is closed gracefully, also a message can be displayed on the client, why it was not allowed to connect to the server.
  14. Offline

    Kartus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    FYI - example of an issue - resolved
    first whitelist worked well. than after installation of another plugin BigBrother, I had issue that i was on whitelist with my playername, but i received "you're not on whitelist" from server while connecting. i tried serverrestarts and whitelist reinstallation and copied old whitelist.txt again into whitelist-folder with FTP. all didn't work. then i installed bukkit #66, reinstalled whitelist, uploaded old whitelist.txt with FTP = not working. then I reinstalled whitelist and I only copied + pasted the names from old whitelist.txt on my harddisc into the "new" whitelist.txt on the server. then it worked well like at beginning. i don't know why... same to BigBrother, its working now, before it doesn't too. probably the bukkit #66 was a good reason to work :)
  15. Offline

    DjDCH

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No no no, you got it wrong. I was very suprise when you tell me that no Cancellable method was implement. I found this very weird that bukkit wasn't implement a such method in this context.

    But, check this out. You have two specific method for the PlayerLoginEvent, allow() and disallow(Result result, String message). In your case, you need to use disallow like this :
    Code:
    event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "You cannot login while you are not in the whitelist !")
    This should be work very well. And, this is nicely design. This is why I like the bukkit projet.
  16. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @DjDCH: Ah lol, how could I overlooked that? :O
    I could swear it wasn't there when I started, but it certainly was...so thanks, I'll update it asap :)
  17. Offline

    maxsteele

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Wow, you guys are fast. Thanks!
  18. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  19. Offline

    maxsteele

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Silence, thanks for that fix! My players are no longer recieving the "joined" "left" messages when someone hits the whitelist.
  20. Offline

    Nico79

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Mmmh, i downloaded the zip-file but there is no .jar-file included. :(
  21. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Nico: Really? I just tried it, and my downloaded .zip contained the whitelist.jar
  22. Offline

    Nico79

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is what i got:

    Whitelist_1.2.zip

    After unzipping i got:

    Whitelist
    --> com -> bukkit -> silence -> whitelist -> Whitelist.class and WLPlayerListener.class
    --> META-INF -> MANIFEST.MW
    --> plugin.yml
  23. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You 'unzipped' the .jar, too (what you see is the content of the whitelist.jar).
  24. Offline

    Nico79

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah, yes, i see it at this second.

    My crazy Mac unzipped the .zip first and then, without asking, the .jar-file too. *argh*

    But if i use stuffit-Expander, only the zip-files get's unzipped.

    Tadaaaa, there is the .jar-file.

    Great, thanks!! ;)
  25. Offline

    monotonehell

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've been running this for 24 hours now across two servers, works well.

    Some ideas for implementation if you're interested.
    *Configurable location for the whitelist.txt.
    I'm running several worlds. It would be nice to have a central whitelist instead of a copy for each world.

    */whitelist reload available from the console.
    Again if I update the whitelist manually I need to visit each world to issue a reload. It would be nicer if I could do it from the console.

    This is a great stopgap solution until groups and permissions are properly implemented. Nice work. :D

    10 points.
  26. Offline

    DjDCH

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If you are your minecraft server run on a linux system, make some links ! It's easy to do and this solved the issue.
  27. Offline

    monotonehell

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Was considering linking... wasn't sure if it would cause issues... will try, thanks.
  28. Offline

    arthoz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Bug: When using commands on build 80 while having Whitelist active, your hearts get set to 9.
  29. Offline

    DjDCH

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Not a "bug" since I found this in the source, in the onPlayerCommand method:
    Code:
    event.getPlayer().setHealth(18);
  30. Offline

    arthoz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    okok, "most likely left in debug thingie(?) not mentioned in changelog that appears to others as a bug"-thing then ;P
  31. Offline

    Silence

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Lol, I think I've stupidly merged the wrong sources, will fix this when at home asap
  32. Offline

    uncovery

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Great plugin, works very nicely here!

    Do I understand correctly that edits to the whitelist.txt are ineffective unless the plugin is reloaded or the server is restarted?

    It would be GREAT if this could be changed and that the whitelist is re-read whenever a user joins. I do not know what is more efficient/safe, but I have a script where people whitelist themselves by answering a questionnaire, and a script adds their nickname to the text file. So it would be really great if this would be adding them to the whitelist without having to manually reload the whole plugin!

    Thanks!

Share This Page