So, it's been brought to my attention that a lot of people are struggling to use PermissionsEx (PEX) along side EZRanksPro. It's actually pretty simple once you've gotten the hang of it, and I assume that it is because a lot of people don't understand the weight system within PermissionsEx. I'm not doing to be going into heavy detail about the weight system. If, at the end of this guide, you're still a bit confused on how the weight system works, you can visit this thread, which explains it very well.
Essentials(X) (or, any other Vault supported economy plugin).
Vault is an API that handles chat, permissions and economy, and it is what EZRanksPro hooks into for handling permissions (ranking up), and for handling economy (checking the costs, player balance, etc).
We're going to be creating 5 Permissions groups: A, B, C, D, and VIP. A-D will be our Prison ranking up ranks, and VIP will be our donator rank to show how we can do multiple groups and still play fair.
Now that we have our groups setup, let's go ahead and add weights to them. Remember, the way PermissionsEx determines your Primary group (if you are in multiple groups), is through weights. The lower the number, the higher the priority. Below is a basic example of how the groups should look with weights added to them.
Okay, we've now got our permission groups setup, the next thing to do is to add the required EZRanksPro permission node to them, so the plugin knows what rank to rank you up to. The permission node is "ezranks.rank.<rank>", and it can be found on the EZRanksPro plugin page. The <rank> placeholder should be replaced by the section name in your EZRanksPro rankups.yml file (we'll get to that later). I also just added a random permission node to the VIP group, this is where you'd put your donator perks.
Okay, we're essentially done with the permissions.yml file, now, we can move over to EZRanksPro.
If you are going to have multiple groups (for donors, staff, etc) you'll need to change this to true in the EZRanksPro configuration file. This tells the plugin to ONLY look inside of your primary permission group for the rankup information (the ezranks.rank.<rank> permission node).
Alright, so, now you're ready to create (well, edit) your rankups.yml file.
# Create your rankups in this file.
# let it regenerate an example rankup.
Okay, so, in this tutorial, I'm only going to be creating a rankup from A to B. You should be able to get it from there. If not, I've included a video tutorial at the end of this wiki/tutorial.
We're going to analyse the rankups section bit by bit.
The first thing, the section name.
A: - This is the name of the section and will hold any rankup information for the A group. This is where the ezranks.rank.A gets the rank information from.
order: 1 - This is the order of the rankup, it goes it counting order, so, from 1 to 2 to 3 and so on. You want to make sure that your rank order follows this pattern.
rankup_to: B - This is the name of the PermissionsEx group that you will be ranked up into once you meet all of the selected requirements.
cost: 1000.0 - This is the cost of the rank. This is how much the player will need to have in his balance in order to rankup. The plugin uses Vault here, so, this is why you need a Vault supported economy plugin.
rankup_actions: - This tells the plugin what to do when the player SUCCESSFULLY ranks up from this group. You can add anything from the supported list here, but, it is very important that you add [addgroup] and [removegroup].
[addgroup] - Adds, not sets the player into another PermissionsEx group. The %rankup% placeholder will be replaced with the groups name as defined in rankup_to.
[removegroup] - This removes the player from the defined group within PermissionsEx. The %rank% placeholder will be replaced with the group name that they are currently in. It's recommended that you do it this way, and not with console commands.
So, repeating these steps to create our other groups should look like this. Remember, I'm only creating 1 more, you should be able to do the rest.
Alright, we're almost done, just a few things left inside of this file. We're going to analyse it one by one, again.
last_rank - The section which defines all the settings for the last rank.
rank: Z - This is the name of the PermissionsEx group that the player will need to be in for the plugin to recognise it as the last rank.
requirement_message: - The message that will be sent to the player when they try and rankup, but cannot afford it. The %cost% placeholder will be replaced with the amount of money it costs to actually rankup. The %rankupprefix% placeholder will be replaced with the prefix of the rank (defined in EZRanksPro) that the player is trying to rankup to.
Okay, we're done. Now, here is an important note to remember when dealing with PermissionsEx group commands.
You want to use the add command to add them to a group, rather than the set command, which sets their group.
/pex user <player> group add <group> - This is the command that you want to use. Replace <player> with the players name and <group> with the groups name.
Still confused? Here is a semi in-depth video tutorial!
If I'm not mistaken, THIS file should work. It's not been tested, so, please report back with any issues.