Plugin category: Misc Suggested name: SDWhitelist What I want: This plugin hooks into the enjin API and whenever a user registers on the website, it would automatically update the server's whitelist.txt and the player would be allowed into the server in less than 2 minutes. Ideas for commands: No commands needed for this plugin. But if possible, please add /enjin update : updates the whitelist Ideas for permissions: sd.whitelist. allows you to use the above command. When I'd like it by: in a week or less
I'm also interested in this. Could this also include some way to promote the players ingame after registering on the site, for example?
http://www.enjin.com/apidocumentation Enable Public for the API and send me a link and I'll see what I can do...
i agree with oman, would it be possible to make it so if tagged with a " mod" tag it would promote them in-game?
I'll be making this after I finish the shopping system I'm already knee deep in the JSON anyway. so yah it could. Source: https://github.com/deathmarine/EnjinWhiteList Download: https://github.com/downloads/deathmarine/EnjinWhiteList/EnjinWhiteList.jar Configuration: Code: #Connections# WebsitePath: 'http://www.whateversite.com' KickMessage: 'Your not currently whitelisted.' This will whitelist and update players every 60 secs from your Enjin Site. Granted you have /api/get-users access. I didn't do the tag checking considering you have to check every player. then check every tag from every player with the way the api is setup. *Prays that the request for Enjin API crap stops. The demons should be appeased. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Any chance you would update this to work with 1.3? Im getting this error when using it now. 23:39:27 [SEVERE] java.io.FileNotFoundException: http://www.dwarfsvszombies.enjin.com/api/jsontest.txt 23:39:27 [SEVERE]at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 23:39:27 [SEVERE]at com.modcrafting.enjinwhitelist.EnjinWhiteList.loadPlayers(EnjinWhiteList.java:59) 23:39:27 [SEVERE]at com.modcrafting.enjinwhitelist.EnjinWhiteList$1.run(EnjinWhiteList.java:35) 23:39:27 [SEVERE]at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34) 23:39:27 [SEVERE]at java.lang.Thread.run(Unknown Source)
If you click the link to the file. It pulls a 404. Just point the plugin to your enjin api. Edit I found it for you. http://www.dwarfsvszombies.enjin.com/api/get-users
I will try changing it in the config but isn't the bad link direction in the source? Specifically this line? url=newURL(web+"/api/jsontest.txt"); You append the url to add a missing directory it seems. I know a bit of code, I just don't have a means to compile (never learned how to do it with all the bukkit req's). Do you need to change the source and recompile or can I simply change the url in the config?
Good point. I never pulled my testing bit of code out and no one corrected it for 2 months. Either way I changed it to the full URL is pulled from the configuration. The download link has been updated to the most recent version. In the configuration use the full url example. http://www.dwarfsvszombies.enjin.com/api/get-users And it should be fine.
Does whitelisting need to be disabled in the bukkit config? The whitelist.txt in the root of the server files doesn't update but the plugin says it is getting the right number of users. It seems from the source file that it is creating the list internally and not actually saving it to the whitelist, so if I turn off whitelisting, this should manage my whitelist properly on its own correct? Thanks a ton, sorry for the confusion and for reviving this thread :/
Now I am spitting out this error: 17:14:24 [SEVERE] Unexpected character (<) at position 0. 17:14:24 [SEVERE]at org.json.simple.parser.Yylex.yylex(Unknown Source) 17:14:24 [SEVERE]at org.json.simple.parser.JSONParser.nextToken(Unknown Source) 17:14:24 [SEVERE]at org.json.simple.parser.JSONParser.parse(Unknown Source) 17:14:24 [SEVERE]at org.json.simple.parser.JSONParser.parse(Unknown Source) 17:14:24 [SEVERE]at org.json.simple.parser.JSONParser.parse(Unknown Source) 17:14:24 [SEVERE]at com.modcrafting.enjinwhitelist.EnjinWhiteList.loadPlayers(EnjinWhiteList.java:64) 17:14:24 [SEVERE]at com.modcrafting.enjinwhitelist.EnjinWhiteList$1.run(EnjinWhiteList.java:35) 17:14:24 [SEVERE]at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34) 17:14:24 [SEVERE]at java.lang.Thread.run(Unknown Source) 17:14:28 [INFO] goldwing25 lost connection: disconnect.quitting
Json starts with a { not a < so I'm assuming your url is pointed at a web page <html>syntax</html> instead of {"JSON":"Syntax"} check your link
This is the link I am using, its been working fine so far. Perhaps enjin changes the api?http://dwarfsvszombies.enjin.com/api/get-users Nvm, it seems to be working fine now, perhaps the enjin api was unavailable for a few hours? Idk, I will chalk it up to a bug. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
The error is back, idk if it is something with enjin or not but I am sure its their fault somehow. They keep making changes to their plugin, (which does everything but whitelist) so they are probably changing their system in some regard as well.
There is an enjin developer that has made a plugin for this and donations so I don't know how well this is going to work.
Sorry to bring this topic back up, but can anyone update the plugin to have it copy all the characters from the site as well? Here is the link to the API:http://www.enjin.com/apidocumentation
His post was from june when enjin didn't support that. They still only support syncing ranks and whitelist of players who have a registered mc character. I think this plugin is better because it keeps the whitelist in memory instead of in a file, so its more secure. Hopefully someone can update this so it uses mc characters and forum usernames.