[ADMN/WEB] CommunityBridge v1.10 BETA - Integrates Players with MySQL + Stat Tracking [1.6.4]

Discussion in 'Inactive/Unsupported Plugins' started by NoRC, Apr 6, 2012.

  1. Offline

    NoRC

    Update: Its been a while but as I have closed my Forums I needed a way to still track users and publish information on my site so I have added a new feature that allows the creation of database records for users. This is a work in progress and there will be some updates in the coming days as I finalise it but I have posted the new version so you can try it out if you like. There is only one new line in the config called "create-players" which is either TRUE or FALSE. If set to true then it will insert a record into the USERS table for the players when they connect. This does not support multi-table systems yet I am working on that.
    First thing is first, credit goes to Chiller for the base to which this plugin is based off. His work with ForumBridge was what inspired me to update and add to his already great plugin. So in essence this is a continuation of Chiller's ForumBridge plugin, I have added some new features and cleaned up a few small bugs. I have also added some basic statistics tracking and the ability to set requirements to play on the server. There are a whole slew of features available in this release and more to come in time. So the reason its not ForumBridge is because its more of a CommunityBridge in my opinion as its not limited to using just forums as a base point for access control.
    Why Community Bridge?
    • Slow down Griefers by requiring them to register with your website
    • Encourage players to be active in your website community
    • Use statistic tracking to display leaderboards
    • Show "Whos Online" in your MineCraft server on your website
    • Supports Permissions
    • Secondary Groups members can be in more than 1 group
    Supported Permission Systems
    • bPerms
    • PermissionsEx
    • GroupManager
    Supported Web Systems:
    • Invision Power Board
    • phpBB
    • XenForo
    • MyBB
    • Boonex Dolphin
    • Pretty much any Forum or Website
    Configuration Options:
    • Only Allow Registered Players to Connect
    • Customisable Messages
    • Set Players require Avatar on Website to get permissions
    • Set Players require minimum posts in Forum to get permissions
    • AutoSync Timer
    • Track Health, Character Age, Total XP, Level, Time spent playing, Last Online & Online Status
    Installation/Integration Guide:
    • I have included to txt files in the zip, one is an example of how to display the tracking fields in invision power board the other is for XenForo.
    • You will need to run the plugin once to generate a default config file which you can then edit.
    • More Detailed Instructions Coming Soon!
    Permissions:
    • communitybridge.* - Able to do everything
    • communitybridge.cbban - Able to ban players from the site
    • communitybridge.cbunban - Able to unban players from the site
    • communitybridge.cbrank - Able to rank players on the site
    • communitybridge.cbsyncall - Able to sync everyone to the forum
    Commands:
    • /cbban <player> - Bans them from the site
    • /cbunban <player> - Unbans them from the site
    • /cbrank <player> <group> - Puts that user in that group
    • /cbsyncall - Syncs all the players to their forum rank
    • /cbsync - Syncs that player to their forum rank "In case auto sync isn't working"
    For Invision Power Board Minecrafters here is my current version of customfield_generic under the profile options in the template editor: http://pastebin.com/aYs6TrWc

    Change Log:
    • Version 1.11:
      - Fixed a bug where it would not set players offline on disconnect when using single table or multi-table with key.
      - Creates users properly now
    • Version 1.10:
      - Added a new feature to create database records for new players this currently only supports single tables and is a work in progress.
    • Version 1.07:
      - Added secondary timer option to remind unregistered users more frequently to register (Requested by Ablac)
      - Compatable with 1.2.5-R4
    • Version 1.05:
      - Fixed some broken Commands
      - Plugin disables itself when there is a SQL query problem
      - Better SQL Connection checks before queries
    • Version 1.04:
      - Fixed Permission Names
      - Updated Commands
    • Version 1.02:
      - Fixed bPermissions
    • Version 1.01:
      - Added comments to default config.yml
      - Fixed missing value from config.yml
    • Version 1: Initial Release
     
  2. Downloaded and installed, Testing it now

    Is there a way for this to work with Tekkit?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  3. Offline

    NoRC

  4. Offline

    Infuscu

    I am receiving this error (look likes it cannot connect to my xf database?):

    Code:
    [WARNING] [CommunityBridge] SQLException! Access denied for user '<DB-USERNAME>'@'static.53.214.6.456.clients.your-server.de' (using password: YES)
    (I replaced the db-username and the numbers .. not knowing if they give anything away.)


    Right after I receive the following error but I suspect it appears because I cannot connect?:
    Code:
    [SEVERE] Could not pass event PlayerJoinEvent to CommunityBridge
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:132)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:129)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:41)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:61)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NullPointerException
        at net.netmanagers.api.DatabaseHandler.sqlQuery(DatabaseHandler.java:95)
        at net.netmanagers.api.SQL.sqlQuery(SQL.java:29)
        at net.netmanagers.community.Main.getUserId(Main.java:337)
        at net.netmanagers.community.Main.SyncPlayer(Main.java:494)
        at net.netmanagers.community.EventListener.onPlayerJoin(EventListener.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        ... 9 more
    I use XenForo, and did enter the db information for my webserver correct as far as I know.

    My config:
    http://pastebin.com/k1TDFFEb
     
  5. Offline

    NoRC


    It may work then, I havn't tested with that only with Craftbukkit 1.2.4 & 1.2.5... I can't see why it wouldn't work.

    The second error is due to the first error... and the first error at a very quick guess would be that your MySQL server (providing you have entered the correct Host, Username, Password & Database) is not allowing remote host connections. Can you confirm if your minecraft server runs on a different machine to your forums?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  6. Offline

    Infuscu

    Yes, it does indeed run on a different machine at another location. But I will look into the problem regarding no mysql access from outside.

    You were absolutely right, I had to allow the ip at my host. Thank you.

    Ok, I'm still not sure if I understand the multi-tables .. what are their use?

    Also I am having a bit of trouble getting CommunityBridge recognising me. My Minecraft IGN (Infuscu) and website username is the same thus I do not use any custom user fields to let members type in their Minecraft IGN. Here's a snapshot of my xf database:

    View attachment 9110

    Yet I am receiving the following response from the server:

    Code:
    17:43:59 [INFO] [CommunityBridge] Set Infuscu to group default
    17:43:59 [INFO] [CommunityBridge] Infuscu's name not set or not registered on community site
    
    My config is still the same as above but with a change to the default-group.

    EDIT: As you can see on the website, my user_group_id is 3 which I also set in the config ( '3': administrator). I suspected to be assigned to the administrator group.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  7. Offline

    NoRC

    http://pastebin.com/evUsqEJu

    I left a field out of the default config.yml

    I have posted an updated version of your config on pastebin.
    (user-name-field: username)
     
  8. Offline

    Spadow

    NoRC
    Can you make it compatible with woltlab burning board?
     
  9. @NoRC my forum is XenForo, Could you use give me a config for this? as the config is for IPB?
     
  10. Offline

    NoRC

    The default config it saves in v1.01 has enough explanation that you should be able to adjust to suit your DB...

    However tomorrow I will try post a XenForo config...

    Spadow depending on what burning board is I don't see why it wouldn't work...
     
  11. I'd be grateful for a config NoRC
     
  12. Offline

    thernztrom

    Your plugin looks awesome, I'm pumped to test it :D

    It will most likely work, just because he mentions a few in his description that doesnt mean it is only compitable with those. Just check your forums database and match the config detials with it.

    NoRC
    It doesnt work properly with bperms for me. Its the same problem as Chiller has with the original plugin:

    When entering the server this comes up in the log:
    Code:
    2012-04-09 15:04:06 [INFO] KlasVonKlas [/79.138.112.12:56678] logged in with entity id 1887 at ([world] -408.5613115027363, 63.0, -91.06311209221961)
    2012-04-09 15:04:06 [INFO] [34m[bPermissions] [31mPlease select a loaded world![0m
    2012-04-09 15:04:06 [INFO] [34m[bPermissions] [31mNothing is selected![0m
    2012-04-09 15:04:06 [INFO] [CommunityBridge] Set KlasVonKlas to group guest
    2012-04-09 15:04:06 [INFO] [34m[bPermissions] [31mPlease select a loaded world![0m
    2012-04-09 15:04:06 [INFO] [34m[bPermissions] [31mNothing is selected![0m
    2012-04-09 15:04:06 [INFO] [CommunityBridge] Added KlasVonKlas to group viking
    2012-04-09 15:04:06 [INFO] [CommunityBridge] KlasVonKlas linked to Community User #278, Group: guest
    bPermissions doesnt seem to know where to add it, although it does get added, but as guest. It says in the log that it added KlasVonKlas to group viking, but it adds it to the default group Guest instead.
    Not sure why it does, do you have any clue?
    Using CB-1.2.5RB1, Vault 1.2.14, bpermissions 2.9.1 and CommunityBridge 1.01.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
    NoRC likes this.
  13. Offline

    NoRC

    Just posted a new build try it out :)
     
  14. Offline

    Deadlystrike

    i love it its working well, however a few things
    when ever somone joins it caues a 2 space line break in chat
    and if i just want your plugin to sync the forum rank to the permmisions and not vice versa what database perms does it need just select?
     
  15. Offline

    thernztrom

    Thanks for your reply! It working better now :)
    However, there are a few things I'm wondering.
    - When you do the command /sync, can you add a message in reply to the user using the command, if it was synced sucessfully or not?
    - I have all the permission nodes you've written above, even tried the forumbridge.*, but eveytime I do any of the commands I get the reply that I dont have permission to do them.

    - Also, do you know why it adds you to the guest (default group) first, then the "real" group. Like so:
    Code:
    2012-04-10 02:19:28 [INFO] thernztrom [/79.138.112.12:52889] logged in with entity id 5495 at ([world] -394.170387050003, 67.6111485568898, -94.32204227275038)
    2012-04-10 02:19:28 [INFO] [bPermissions] Set selected world to world
    2012-04-10 02:19:28 [INFO] [bPermissions] thernztrom selected.
    2012-04-10 02:19:28 [INFO] [bPermissions] Set thernztrom's group to guest
    2012-04-10 02:19:28 [INFO] [CommunityBridge] Set thernztrom to group guest
    2012-04-10 02:19:28 [INFO] [bPermissions] Set selected world to world
    2012-04-10 02:19:28 [INFO] [bPermissions] thernztrom selected.
    2012-04-10 02:19:28 [INFO] [bPermissions] Added admin to thernztrom
    2012-04-10 02:19:28 [INFO] [CommunityBridge] Added thernztrom to group admin
    2012-04-10 02:19:28 [INFO] [CommunityBridge] thernztrom linked to Community User #2, Group: guest
    It does work, but why not just add me directly to the admin group instead of adding me to guest right before?
     
  16. Offline

    NoRC

    Its setting them to the primary group guest, then "adding" them to any secondary groups.

    Basicly it requests their PRIMARY user group from the database, sets them to that group.
    Then if you have secondary-groups-enabled true, it will check the secondary groups table and add them to each of those groups.

    Im going to take a stab in the dark that the users primary group isn't mapped or is mapped to guest.
     
  17. Offline

    md_5

    Seems nice, approved.
     
  18. Offline

    Ablac

    The MultiTable is if you store your Minecraft Username in a different table as the Forum Login. For example if you have Xenforo, and you use a Custom User Field it dosnt store that in the Xf_Users database but in the XF_User_Field_Value so with MultiTable it looks in XF_User_Field_Value to get the MC Username and the User ID number then goes to XF_User table and gets the Groups ECT.

    Also dont use a DNS for the MYSQL address it dosn't work most the time, use the direct IP.

    Here is a working Xenforo Config file for anyone that needs it
    http://pastebin.com/kee7rt5z

    This config requires you to make a Custom user field called Minecraft, which will store there Minecraft Username.
    This config requires you to make a Custom user field called online_server, which will store there Online Status.
    This config requires you to make a Custom user field called mclastonline, which will store there Last Time Online.
    This config requires you to make a Custom user field called mcgametime, which will store How long they have been playing
    This config requires you to make a Custom user field called mchealth, which will store there Current Health.

    Checking for Avatars dosnt work in Xenforo due to it not storing a Yes/No he has an avatar.
    This is also an issue with Gravatar Avatars due to the Separate Storage for them.
     
    NoRC likes this.
  19. Offline

    JOPHESTUS

    I'm not sure I fully understand the post, I want my forum to use people's ranks on my server, is this what it does? Or does the server use the ranks from the forum?
     
  20. Offline

    NoRC

    This plugin allows the MineCraft server to assign players to their forums ranks/groups.
     
  21. Offline

    thernztrom

    NoRC
    I't works without any errors with latest Vault, bperms and this :) Thanks for making a good forum - permission bridge!
    Only one thing I'm wondering, if there is any posibility you could add a message when the user does the command "/sync", as a reply if it went succesful or not. E.g. "Your rank was successfully updated." ?
     
  22. Offline

    Wbjpen

    Nice plugin, I'll probably use it. Could you add when a player registers on a website/forum, they get a permission group?

    And would this work with Enjin?
     
  23. Offline

    Infuscu

    The plugin was working great but started to receive these errors, which are really fatal as it totally crashes my server .. means I cannot connect again, and I have to force craftbukkit to close. So I've had to do a few rollbacks sadly.

    Code:
    00:36:59 [WARNING] [CommunityBridge] Connection Lost Communications link failure
     
    The last packet successfully received from the server was 1,608,596 milliseconds ago.  The last packet sent successfully to the server was 1,028,691 milliseconds ago.
    00:36:59 [WARNING] [CommunityBridge] Connection Lost No operations allowed after connection closed.Connection was implicitly closed by the driver.
    00:38:12 [INFO] /50.23.30.168:39872 lost connection
    00:39:51 [INFO] [CommunityBridge] Running Auto Sync
    00:40:09 [WARNING] [CommunityBridge] SQLException! Communications link failure
     
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    00:40:09 [WARNING] [CommunityBridge] Error at SQL Query: No operations allowed after connection closed.Connection was implicitly closed by the driver.
    00:40:09 [SEVERE] java.lang.NullPointerException
    00:40:09 [SEVERE]      at net.netmanagers.community.Main.getUserId(Main.java:338)
    00:40:09 [SEVERE]      at net.netmanagers.community.Main.SyncPlayer(Main.java:494)
    00:40:09 [SEVERE]      at net.netmanagers.community.Main.syncAll(Main.java:487)
    00:40:09 [SEVERE]      at net.netmanagers.community.Main$1.run(Main.java:284)
    00:40:09 [SEVERE]      at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    00:40:09 [SEVERE]      at java.lang.Thread.run(Unknown Source)
    00:40:09 [WARNING] [CommunityBridge] SQLException! Communications link failure
     
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    00:40:09 [WARNING] [CommunityBridge] Error at SQL Query: No operations allowed after connection closed.Connection was implicitly closed by the driver.
    00:40:09 [SEVERE] java.lang.NullPointerException
    00:40:09 [SEVERE]      at net.netmanagers.community.Main.getUserId(Main.java:338)
    00:40:09 [SEVERE]      at net.netmanagers.community.Main.SyncPlayer(Main.java:494)
    00:40:09 [SEVERE]      at net.netmanagers.community.Main.syncAll(Main.java:487)
    00:40:09 [SEVERE]      at net.netmanagers.community.Main$1.run(Main.java:284)
    00:40:09 [SEVERE]      at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    00:40:09 [SEVERE]      at java.lang.Thread.run(Unknown Source)
    
    Code:
    00:46:10 [WARNING] [CommunityBridge] SQLException! Communications link failure
     
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    00:46:10 [WARNING] [CommunityBridge] Error at SQL Query: No operations allowed after connection closed.Connection was implicitly closed by the driver.
    00:46:10 [SEVERE] java.lang.NullPointerException
    00:46:10 [SEVERE]      at net.netmanagers.community.Main.getUserId(Main.java:338)
    00:46:10 [SEVERE]      at net.netmanagers.community.Main.SyncPlayer(Main.java:494)
    00:46:10 [SEVERE]      at net.netmanagers.community.Main.syncAll(Main.java:487)
    00:46:10 [SEVERE]      at net.netmanagers.community.Main$1.run(Main.java:284)
    00:46:10 [SEVERE]      at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    00:46:10 [SEVERE]      at java.lang.Thread.run(Unknown Source)
    00:48:27 [WARNING] [CommunityBridge] SQLException! Communications link failure
     
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    00:48:27 [SEVERE] java.net.ConnectException: Connection timed out
    00:48:27 [WARNING] [CommunityBridge] Connection Lost No operations allowed after connection closed.Connection was implicitly closed by the driver.
    00:48:27 [SEVERE]      at java.net.PlainSocketImpl.socketConnect(Native Method)
    00:48:27 [SEVERE]      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    00:48:27 [SEVERE]      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    00:48:27 [SEVERE]      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    00:48:27 [SEVERE]      at java.net.SocksSocketImpl.connect(Unknown Source)
    00:48:27 [SEVERE]      at java.net.Socket.connect(Unknown Source)
    00:48:27 [SEVERE]      at java.net.Socket.connect(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.NetworkClient.doConnect(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.http.HttpClient.openServer(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.http.HttpClient.openServer(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.http.HttpClient.<init>(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.http.HttpClient.New(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.http.HttpClient.New(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    00:48:27 [SEVERE]      at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    00:48:27 [SEVERE]      at com.blockpark.xenforo.RegisterNameRunnable.run(RegisterNameRunnable.java:26)
    00:48:27 [SEVERE]      at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    00:48:27 [SEVERE]      at java.lang.Thread.run(Unknown Source)
    
    Do you know what could be causing it?
     
  24. Offline

    wolvern28

    i'm getting the error:
    Error occurred while enabling communitybridge v1.04 <is it up to date?>

    i just downloaded the plugin as well and i'm getting this D:
     
  25. Offline

    NoRC

    Your MySQL server is booting you... will see if i can find a fix for this.

    wolvern28 im not experiencing this problem... what version of craftbukkit?
     
  26. Offline

    wolvern28

    latest, i think i'm using beta builds

    This server is running CraftBukkit version git-Bukkit-1.2.5-R1.0-1-gcaee240-b2150jnks (MC: 1.2.5) (Implementing API version 1.2.5-R1.1)
     
  27. Offline

    Infuscu

    Alright, I thought so .. sadly I cannot do anything about my host at the moment. It is a restriction from their side, which I cannot change.

    If it just wouldn't crash the whole server it would be fantastic - then I'd probably have to go on compromise somewhere else.

    Thank for the quick answer!
     
  28. Offline

    gawelium

    Hi ! I've got "Severe Error : is it up to date ?"
    Is it Normal ?
     
  29. Offline

    NoRC

    I have tested it with 1.2.5-r1.0 build #02149 and it works without any problems, if you are experiencing problems please only use this plugin with the recommended version. If you are experiencing problems with a different version of craftbukkit then there is nothing I can do to assit you as I only support latest recommended build, sorry guys.

    Infuscu it shouldn't be crashing the server..
     

Share This Page