šŸ”‘ PermissionsEx v2.0 [API 5]

Thanks, now I understand it correctly and how I see I need to go on it from other side :slight_smile: Thanks i go to completely rebuild it :smiley:

1 Like

For the last question, have a look at my previous post :slight_smile:

EDIT: After a ton of fiddling around (and reading the RankingCommands.java on GitHub), I seem to have found the solution. The correct command to add any group (existing or otherwise, case sensitive) to any rank ladder (ditto) is /pex rank [rankname] add [position] {entryType} [groupname]

I believe the [position] is supposed to be optional, but then the command fails and you need another argument. Adding that argument after the group will result in those two words being added to the top of the ladder, with the first keyword as the type of entry - For example /pex rank [rankname] add player Lemodile Will add player Lemodile to the top (as opposed to group Owner). This also works with the positioning system, so you can have a number between add and player (or whatever other keyword you want, though I donā€™t know what those do).

You can move groups on the ladder relatively and absolutely. The absolute command is the same as adding a new group entirely, stated at the top of this post. The relative doesnā€™t work negatively at all (adding to the absolute negative position, thus doing nothing at all - with or without ā€œā€), but the positive works the same as absolute+1 in all versions Iā€™ve been able to test. Higher number means higher on the ladder, naturally, and it seems to start on index 0. The indexing is also kind of wonky, requiring a higher -r [addIndex] the higher on the ladder you are from before. Iā€™d therefore recommend using absolute positioning for now :slight_smile:

I also have to /pex reload between every command that changes anything for the change to show up in any list. If you try to change more than one rank at a time, only the last one is actually put into effect, most of the time.

A lot of this behaviour seems like bugs - or maybe Iā€™m just doing it wrong :slight_smile: Calling @zml for clarification.

EDIT2: It seems that stopping the server and restarting it will convert the user that hasnā€™t connected before to the correct UUID and keeps the ranks etc. youā€™ve given them. However, pex user [name] info will not translate the name into the correct UUID unless theyā€™re online at the time you run the command, thus most likely showing nothing (this last quirk is the same for players that have connected before).

3 Likes

I m thinking about ranking too, but Im from your explanation something confuse :frowning:
I would like to know how its possible to configure Ranks and where, which then I can give the users?
is there any possibility to add some options to ranks like prefix, name or some other permissions or add ons that is then added to player?

My plan is to have about 3 ranks, which will be then added player after their merit and give theme some advantages with it.

Do you have any config file to look at it?

EDIT: I have testedte command /pex rank [rankname] add player Lemodile with number but after adding the number I lost it from config file.
EDID 2: And after command pex user [name] info Iā€™m unable to work with console and have many errors.

I think youā€™re confusing ranks with groups. The /pex rank command administrates ladders of relative rank between groups. Groups can have permissions, and probably prefixes as well (though you will most likely need some sort of chat plugin to use them).

Say you have three groups: Group1, Group2 and Group3. Group1 has the base perms, Group2 has a few perms of its own, and Group3 has another list of permissions of its own.

If you want Group2 to have all perms from Group1 as well, you use the command /pex group Group2 parent add Group1. You can then use /pex group Group3 parent add Group2 to make it inherit from both Group2 and Group1 through nested inheritance.


EDIT: (With disclaimer: I havenā€™t tested this part)
If you want to go a step further, you can use the commands /pex rank PlayerRanks add 0 Group1, /pex rank PlayerRanks add 1 Group2 and /pex rank PlayerRanks add 2 Group3 to add all three ranks in ascending order to the PlayerRanks ladder. If someone is in Group2, the command /pex promote [name] PlayerRanks should move them to Group3, whereas the command /pex demote [name] PlayerRanks should move them to Group1. You can use this to easily automate rank changes :slight_smile:

1 Like

I will use it on one group but I will be able to add the users with some rank some extra features, like more homes, some extra money, etc ā€¦ so I ask and try to understand the ranks here. By Bukkit was it fully others.

Yes. Those are extra permissions, and thatā€™s how parents work. For the money, youā€™ll have to use an economy plugin just as in Bukkit. Homes shouldnā€™t be a problem if any plugin has done like Essentials did and implemented number of homes as a permission (for example: essentials.sethome.multiple.[keyword], where [keyword] is defined by you in the Essentials config).

Thank you Lemonous!!

Your EDIT was most helpful. I was able to get the ladder working, however there are a couple of things that I have discovered. When you add a rank at 0, 1, 2, etcā€¦ The numeric order must remain. Example, if you add 0, 1, 2, then add your OP level group as level 10, anticipating that there will be a few other ranks youā€™ll add later, it will not get added to the ladder.

Also, you can only have 1 ladder, so if you use the /pex rank default add 0 group0 command, your ladder will be called default. I was not able to add another ladder called random, or anything like that, you have to destroy the first ladder to create a new one. Makes sense though, since you shouldnā€™t need more than one ladder in a single world.

Thank you for the permission explanation as well, I also think it is backward, which is why I was confused, I didnā€™t see your reply before I posted that first one. :smile:

Now that my permissions are mostly in order, Iā€™m ready to start adding other mods! Thank you all for the information and the help!

ALSO:
I had to reload pex after adding each rank of the ladder or the settings didnā€™t seem to apply.

1 Like

Nice to see Pex being ported to Sponge.

Iā€™ve tried the latest dev but couldnā€™t get the meaning of the command format. Is there some quick examples or a wiki explaining what ā€˜subjectā€™ means for Pex 2.0?

This might help too:

Hi there!
Iā€™ve decided to make a sponge server yesterday and iā€™ve got some issues with it.
Everything is discribed in movie that iā€™ll post below but now iā€™ll write about it.
Iā€™ve installed a few plugins including pex which configuration after about 5 years with bukkit was damn hard especially because iā€™ve wasted hour to find any command list for this one (editing permissions in server files looks werid compared to bukkitā€™s pex) xD
ANYWAY after that all and a few servers restarts pex wont load. I mean i canā€™t find any error in console about pex loading but then when i try to use any pex command in console or on server it says there is no such a command.
I was a bit confused (maybe because it was 4th after midnight lol) and decided to end work on server for yesterday.
Today iā€™ve tied installing any other pex version (ofc sponge version) but it wasnā€™t effective (everything is still like before)

^The video that i was talking about before. Looking for any help because i canā€™t play without bukkitlike plugins and my and my friends really want to run some mods on our server ;-;
Greetings!

I use this plugins, so I can use these extras, but I donā€™t know how to combine it with ranks. I have it now only set with groups, but I will use it with ranks too, if it possible.
For example: I have player who reach higher rank after reaching some conditions so I will give him some extras, like some money, add an extra home etcā€¦

Server runs without errors, but after entering the game in the client writes an error: (pastebin)
(Sponge 1.8-1499-2.1DEV-630, plugins: SpongeEssentialCmds, TotalEconomy, Flexiblelogin, WorldEditForge, NEI, CodeChickenCore)

As far as I know, ranks in PEX only give more/fewer permissions, and perhaps a prefix/suffix. If you want to give more homes, you should see whether thatā€™s possible with permissions (like Essentials did for Bukkit). PEX is not and has never been able to run commands for you automatically. You will most likely need something along the lines of the Bukkit plugin OnTime.

@Ekib: Try updating to a newer version of SpongeForge, looks like there was a change in player leave/join handling in Build 633. Iā€™m not 100 % sure if thatā€™s relevant, but Iā€™d recommend updating either way :slight_smile:

I use Essentials and economy and they add these as permissions to PEX.
But what I donā€™t know is how to use it in PEX with ranks.
The Ranks are fully new for me and donā€™t know how to use it with one group of player and permissions that are possible to set.
Good will be not only explanation, but to have the possibility to see the config file where are ranks set for one group and how they bring any changes to the group.

I donā€™t have time to make an example permissions file for you, but Iā€™ll do my best to explain.

Say you have two groups, Group1 and Group2. You want Group1 to have access to more homes than Group1. To do this, you define two limits in the Essentials configuration file, for example lowlimit = 1 and highlimit = 10. You can then give these limits to the ranks by giving essentials.homes.multiple.lowlimit to Group1 and essentials.homes.multiple.highlimit to Group2. This way, anyone in Group1 will have a limit of 1 home, and anyone in Group2 will have a limit of 10 homes.

So far, so good, but this isnā€™t using ranks yet.

To use ranks, you make a rank ladder and add the two groups with the commands /pex rank [laddername] add Group1 and /pex rank [laddername] add Group2, in that order. This will let you use the /pex promote [playername] [laddername] command to move someone from Group1 to Group2, and /pex demote [playername] [laddername] to move someone from Group2 to Group1. This promotion/demotion mechanic is the only thing ranking adds in relation to what you want (or, at least, how I understand that) - the rest is plain permissions and inheritance.

After sponge build 630 does not work the lever and buttonā€¦ I have two servers, main, work on Sponge 1.8-1499-2.1DEV-630 and second for tests. Test server worked on latest Sponge! Now it is 1.8-1499-2.1DEV-642, it gives the same errorā€¦

Anyone able to help me? Iā€™m trying to add 5 groups but I really donā€™t understand what I have to do, itā€™s my first time working with plugins. I want to learn all of this so I donā€™t need to keep asking for everything.

Examples (permissions.json): http://pastebin.com/5UnU9nkx
Examples (many groups): http://pastebin.com/8SAsJ8BG
Commands: Home Ā· PEXPlugins/PermissionsEx Wiki Ā· GitHub
All can be found in the first postā€¦

1 Like

I have now set fixed amount of homes for each group: ā€œhomesā€: ā€œ10ā€

If I understand you correctly, I need to set all in groups and then over ranks switch these groups?
And how works the homes limits? When I set in one group Lowlimit and in second group Highlimit, how it will be then added home for next rank? Is it possible to do all with one group?

Example:
I have groups: Player, Builder, Moderator, etcā€¦
I will for group Player use these Ranks to reward the players there.
I will do 3 ranks: Player, Warrior and Captain and then I will add them these rewards:
Player - $100, 1 home
Warrior - $200, 2 homes
Captain - $500, 5 homes