PEX SQL Syncing - Help

Discussion in 'Spigot Help' started by Mineblockz, Jun 11, 2016.

  1. Hi there,

    I have honestly looked at every other tutorial available, but I am yet to find a simple tutorial on how to sync ranks across servers using MySQL and PEX, so that if a rank is set on one server it changes on them all, and how to edit permissions when they saved in this way.

    If anyone could provide an up to date and clear tutorial, I would really appreciate it and I'm sure it would help many others.

    Thanks!
     
    • Agree Agree x 1
  2. Looking for this as well.
     
    • Agree Agree x 1
  3. It's a thing every server needs, but I just don't think many people know how to do it, that's why I'm looking for someone to write a good tutorial ;)
     
  4. Noble Pro

    Moderator

    PEX is relatively simple to use when in MySQL.

    If you want to add a permission to a specific server only, you need to name your worlds accordingly to the relevant server, or something unique to that server. From that, you simply add a permission like you normally would (/pex group <group> add <permission> <world>). If you have multiple worlds (such as the nether or the end), just make those worlds inherit from the world you added the permissions towards (/pex world <world> inherit <parentWorlds>).

    If you want someone's rank/permission(s) or group's permission(s) to be synced across, you need to reload PEX on the servers that you did not add the permission on. For example, if you add a permission to the default player group on your lobby, you need to go to every other server and reload PEX on it (/pex reload), which will apply the changes you made on your lobby.

    If you like, I could write up a bit more of a proper tutorial on it and go a bit more in-depth.
     
    • Agree Agree x 1
  5. I am quite interested to know about the /pex reload command, because I know some large servers use PEX, but obviously staff don't keep doing /pex reload every time a new rank is set, so is there a plugin that does this automatically.

    It would be really great to have a slightly more in depth tutorial and I know a lot of people would appreciate it, and it would finally put an end to this question being asked, and all the confusion.

    Thanks ;)
     
  6. So you would have to name your worlds something like this:
    world_Survival
    world_Factions

    etc?

    If I recall correctly.
     
  7. Could swear I made a post about exactly how to get PermissionsEx running with MySQL once, but I can't find it. The guide in the wiki was outdated back then, and now I can't seem to find that either :/
    I haven't used PermissionsEx for a while now so can't remember a single thing.
     
  8. Noble Pro

    Moderator

    That would probably be the best course of action so you know exactly which world is for which server.
     
    • Informative Informative x 1
  9. I'm just interested mostly in a tutorial on syncing the ranks in the most automatic way possible ;)
     
  10. Noble Pro

    Moderator

    The way I mentioned above has worked for me for over 2 years now. When you have users buying ranks, you can simply run the group add/set command on all servers even when they're not online, and it'll work. Going even further, you can even make it reload PEX just to be sure that the user gets the rank on purchase.

    I guess if there's enough demand for it, I'll write up a full tutorial on how to do PEX MySQL properly.
     
  11. A full tutorial would be great. I was hoping in an ideal world, you would go onto one server and do the /pex user <name> group set <group> and that the change would be made on each server of the network.

    I have heard BungeePerms mentioned as an alternative to do this instead of PEX but I'm not really sure.