[ADMN/GEN] WhitelistPlus v0.2 - Whitelisting with permissions [818]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, May 9, 2011.

  1. Offline

    codename_B

    WhitelistPlus
    A whitelist plugin, plus more.

    Version: v0.2


    A fork of the Whitelist plugin to add permissions support.
    This plugin allows only people on your whitelist, or with the whitelist.permission.bypass node to join the server.

    Features:

    • Simple and easy to use
    • Broadcasts a message whenever someone tries to join that isn't whitelisted.
    • Uses permissions
    • 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
    Permission nodes:
    Code:
    whitelist.permission.bypass - bypass the whitelist check, don't have to be on the whitelist to join the server.
    whitelist.permission.use - base permission for users - necessary for these permissions to work.
    {
    whitelist.permission.add - permission to use the /whitelist add command.
    whitelist.permission.remove - permission to use the /whitelist remove command.
    whitelist.permission.onoff - permission to use the /whitelist on and /whitelist off commands.
    }
    
    Known bugs:
    • As of v0.2 you cannot use the commands in the server console.

    License:
    Distributed under the same license as the original Whitelist plugin. Full credit to the original author, I simply modified to suit my needs and distributed incase it suited anyone elses needs.
    Source and license included in the .jar file download.

    Download:
    Megaupload v0.2: Link

    Installation / configuration:
    Copy WhitelistPlus.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.
    In your world.yml you can assign the following permission to bypass the whitelist check for a user.
    • whitelist.permission.bypass
    Commands:
    These commands can be used by those with permission in-game. You cannot currently use these with the server console.
    • /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.jar7

    Changelog:
    Version 0.2
    • Fixed error in my use of permissions. Added to bukkit forums.
     
    robbydude and NEO like this.
  2. Offline

    NEO

    So how about that v 0.3 :p
     
  3. Offline

    codename_B

    eheh, I'm in the middle of a $300 programming job, so not atm :p
     
  4. Offline

    MGNick

    For some reason some people can not join the server even though they are whitelisted. It states in Terminal that they are allowed but then they get disconnected cause it states that they are not. How do I fix this?
     
  5. Offline

    dwi

    Can I somehow disable this annoying "Say hello to ..." spam?

    [​IMG]
     
  6. Offline

    BioRage

    Can you please remove "Say hello to X!J@K#J!@"

    "User !#!J# tried to join but he's not whitelisted!!?!!"

    ^ That can you please make it admin's only perhaps permission?
     
  7. Offline

    DrAgonmoray

    @codename_B

    Can you pleasepleaseplease PL0X give out the source, or remove the "Say hello to ____" and "___ is not whitelisted?"
    It wouldn't take that long to post the source, pl0x? I'll give you a cookie
    :D
     
  8. Offline

    codename_B

    source not in the jar?
     
  9. Offline

    DrAgonmoray

    Haha.. ha. Thanks? :D
    Mind if I post a link to without that stuff people have been complaining about on here?

    Yeah, so for all you people who wanted it, here's the plugin without annoying messages:
    Download WhitelistPlusWithoutAnnoyingMessages

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  10. Offline

    BioRage

  11. Offline

    Deleted user

    Great and simple plugin.

    Will use it for as long as it's updated.
     
  12. Is there a api to whitelist/de-whitelist a player? and check if a player is whitelisted?
     
  13. Offline

    thehutch

    would it be possible to add players via the console aswell so when im not online in MC i can still add them via the console.
    also idk if DrAgonmoray would do this since i dont want the message say welcome to but ofc i want the other message so i dont have to look at the console all the time to check if someone has joined?
     
  14. Offline

    CarabinasS

    i change kick-message but he is not change, write : You not in whitelist.... i change to another text, i restart server 3 times. Nothing. :/ help
     
  15. Offline

    codename_B

    Will be rewriting this plugin from scratch at some point to use SuperPerms :)
     
  16. Offline

    slime2

    finally! no more restarts when i'm on my way to white-list people!
     
  17. Offline

    NinjaGrinch

    @codename_B

    When would this rewrite see the light of day? :)
     
  18. Offline

    Buckethead

    cool addon i like! but still work in 1060?
     
  19. Offline

    NemisisX31

    pleasepleaseplease update
     
  20. Offline

    Buckethead

    This happened when i tried to add from console. also in future can u make it an option to anounce people joining

    >whitelist add darkzero 17:00:45 [WARNING] Unexpected exception while parsing console command org.bukkit.command.CommandException: Unhandled exception executing command 'whit elist' in plugin WhitelistPlus v0.2 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12 9) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:3 44) at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489) at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363) at net.minecraft.server.ThreadServerApplication.run(SourceFile:422) Caused by: java.lang.NullPointerException at com.nijiko.permissions.ModularControl.permission(ModularControl.java: 254) at com.nijiko.permissions.ModularControl.has(ModularControl.java:249) at com.ubempire.www.whitelist.Whitelist.onCommand(Whitelist.java:262) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35) ... 6 more
     
  21. Offline

    RustyDagger

    Update to superperms and 1.8 CB when it comes ?\

    @codename_B
     
  22. Offline

    Buckethead

    plzzzzz still need hlp
     
  23. Offline

    MxRacer100

    can you PLEASE make the permission whitelist.permissions.bypass work for permission GROUPS instead of individual players? that way i can simply rank to say trusted and everyone in that category will recieve whitelist bypassing. Would work great for 24/7, i can simply turn whitelist on when im sleeping so on ly my trusted non griefing members can play, but my non trusted guests cant play during that time
     
  24. Offline

    xsebixx

    Ey can you pls add an alternative download Link ?
    (Direct without download couldown ! )
     
  25. Offline

    Buckethead

    if they are already on ur list whydo u need to mess with it anymore?
     
  26. Offline

    Juze

    @codename_B : Could we please have an update? I'd really like to phase out to MySQL on my server someday, and console commands too. I know you're working on the other plugin though, but this won't take too long to update. :p
     
  27. Offline

    MxRacer100

    because i dont want to have to whitelist every single player above what my rank trusted would be, which is alot of people. See with my permissions plugin all my permissions are inherited up so i dont have to keep adding them for every rank (like most permissions plugins) simply having someone trusted or above with a bypass permission would make it way easier than adding to whitelist everytime
     
  28. Offline

    Buckethead

    so u will automatically whitelist everyone who joins ur server? then u dont neeed a whitelist. or if u mean ur higher up groups it still doesnt matter cuz they are already added? i think im missing somethin
     
  29. Offline

    MxRacer100

    look...my first default rank is Member, they get nothing, my second is Trusted, they get the whitelist bypass. For new members once i feel i trust them i can rank them to trusted and it will automaticlly whitelist them through the bypass permissions so i dont have to do 2 commands at once...also for higher up players if they arent already whitelisted, having the bypass node on trusted would give them it too via the inheritance
     
  30. Offline

    Buckethead

    ok got it misunderstood
     
  31. Offline

    smarf12

Share This Page