1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Player Data Bridge 3.12.0

[1.6.4 - 1.11.2] Share players economy, inventory, enderchest, exp and more across servers.

  1. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman submitted a new resource:

    MySQL Player Data Bridge - [1.7.10 - 1.8.7] Share players inventory, enderchest, exp, economy and more across servers.

    Read more about this resource...
     
    • Like Like x 1
  2. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Tweaks

    Read the rest of this update entry...
     
  3. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
  4. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
  5. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Tweaks

    Read the rest of this update entry...
     
  6. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Fixes and performance teaks!

    Read the rest of this update entry...
     
  7. Kieron Wiltshire

    Kieron Wiltshire New Member

    Messages:
    6
    Reactions:
    +4
    I wouldn't recommend this plugin for one simple reason. The developer behind this plugin put little thought into the database schema design and didn't even bother to use Bukkit's Database API which allows the developer to use an Object Relational Map between Java objects and the SQL database. What this means to you non-programmers is if he considered using Bukkit's Database API, the plugin would allow you to connect any SQL database providing you have the correct drivers installed.

    Oh, and not to mention he didn't even use relational mapping at all which is something he should've done to help prevent duplicated data.
    An example is he stores the player's name, and unique id in a column for each table whereas he could've just stored these in their own separate table and linked the primary key of the player's record to the relevant records in every other table.

    Now, don't get me wrong, the idea is neat and although there is duplicated data, it's likely to be kilobytes in size depending on your server's average player count.

    I'd recommend this plugin to anyone who NEEDS it, but I'd recommend for anyone else to look elsewhere.
    It's quality in design is not worth £10.

    brunyman if you wish to discuss what I've mentioned here, more importantly in regards to how you can better design and develop your plugin, then feel free to hit me up with a PM. I don't mind helping you out.
     
    • Informative Informative x 1
  8. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    Hi, recommend and not recommend a plugin just by looking at the description? ...

    This plugin was made for MySQL, and when I first started it i was only syncing economy, and in time added more options and to avoid data loss i went in creating more tables, there is some duplicated as you saw in pictures, like each table has the players uuid and name, but changing now the table structure will be a pain for who is already using it. Also price is not £10 as there is a bit of a value difference on £ vs $, the only reason for this plugin having a price is that it was made for private use.

    Thank you for "trying to help" but I don't think you can recommend or not something you have not tested out.
     
  9. Kieron Wiltshire

    Kieron Wiltshire New Member

    Messages:
    6
    Reactions:
    +4
    I mean no offence, but I don't really appreciate that you're trying to sell a plugin here for quite a high price, it doesn't help the fact that your plugin could be easily rewritten in a few minutes by any seasoned developer and probably contain a lot more features and support.
    I'm just saying you should highly improve your codebase, but please bear in mind I'm making this assumption from your lack of experience in data structure, like I said I'd gladly help you improve your plugin if you want, but just be willing to accept the help. I mean would you prefer to release something that's "okay" and probably will "just about" satisfy your customers? or do you want to release something that your customers can be truly happy with, and perhaps contact you for future work.

    I think you should just think about it, and if you need help, feel free to contact me via PM, Email or Skype.
    Email: kieron.wiltshire@dracade.com
    Skype: kieron.wiltshire
     
  10. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    You can't recommend or not something you did not even test or based on assumptions, or you just posted this to show off. If you wanted to help you could do a friendly post about improvements\suggestions. If you can write this plugin in few min, then why don't you do it, because it should take less time then time spent to post stuff here.
     
  11. Kieron Wiltshire

    Kieron Wiltshire New Member

    Messages:
    6
    Reactions:
    +4
    Challenge accepted.
    I can recommend software based on assumptions if those assumptions have been made with good reason which they have. (from your data structure)

    EDIT, after taking on the challenge I realized that there isn't even any need for multiple tables.
    The data is fairly specific to Minecraft and a simple JSON object stored within the database should be fine. I'll post the source code soon.

    2nd EDIT: Okay, I basically finished it.
    This is how you access a player's data:

    Optional<PlayerData> data = PlayerSync.getData(player);
    if (data.isPresent()) {
    PlayerData holder = data.get();


    holder.put("my-awesome-data", 500);
    int val = holder.get("my-awesome-data", Integer.class);
    }

    You can specify any data you want to add, however the key value must be a string.
    If you want to add custom data such as Inventory data, then you have to register a GSON TypeAdapater here:
    https://github.com/KieronWiltshire/...nwiltshire/player_sync/PlayerSync.java#L78-79

    I'm not going to explain how that's done, it's fairly simple to google.
    Now you can add any piece of data you want whether it be inventories or ender chests, and this only requires one table. I should mention that it's possible to retrieve some built-in keys that I added which are:

    https://github.com/KieronWiltshire/...re/player_sync/backend/PlayerData.java#L38-39

    You can do something like:

    long timePlayed = holder.get(PlayerData.TIME_PLAYED, Long.class);
    Note that time played is in milliseconds and is only updated each time a player quits.
    I suggest doing something like this to retrieve the real time played:

    long timePlayed = holder.get(PlayerData.TIME_PLAYED, Long.class);
    timePlayed += (System.currentTimeInMillis() - holder.getCreatedAt());

    System.out.println(timePlayed);

    Now, I quickly added the reserved keywords, and they're not very practical, especially the way they're set, so if you want to remove them, feel free. :D

    You can even use this code if you want, as long as you give me credit.
     
    Last edited: Jul 24, 2015
    • Agree Agree x 1
    • Winner Winner x 1
  12. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    Right but that's not a functional plugin, witch i don't think it can be done in few min. It's a different way of approach, but i'm not that familiar with GSON, also changing the database data structure now will not be possible since i use the plugin already and i'm planing to add more stuff to sync and so i can't plan a final data structure yet. When i'l get to v 2.0 i'l do database structure improvements. The plugin does it's job well even if there are more tables and that does not get the server laggy (so far).
     
  13. Kieron Wiltshire

    Kieron Wiltshire New Member

    Messages:
    6
    Reactions:
    +4
    Course it isn't a functional plugin, I wrote that in little under an hour. Do whatever you like man, but as it stands.. not worth $10, sorry.
     
  14. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Updates!

    Read the rest of this update entry...
     
  15. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Major update!

    Read the rest of this update entry...
     
  16. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    More sync safety

    Read the rest of this update entry...
     
  17. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Big Update!

    Read the rest of this update entry...
     
  18. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Improvements

    Read the rest of this update entry...
     
  19. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17
    brunyman updated MySQL Player Data Bridge with a new update entry:

    Fixes and more...

    Read the rest of this update entry...
     
  20. brunyman

    brunyman Member Premium

    Messages:
    216
    Reactions:
    +17