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

Instead of "homes" = "10", that place in the config should contain:

"warrior" = "2"
"captain" = "5"```
And so on for all your ranks that you want to give more homes (If that gives an error, add a comma after "1" and "2")

Then you give Player the permission `essentials.homes.multiple.player`, and you gove Warrior the permission `essentials.homes.multiple.warrior` and so on for each of your ranks.

It is not possible to use PermissionsEX to give money. You must find another plugin for that.

The permissions should be added to the ranks section?
And when I put ā€œplayerā€ = ā€œ1ā€ how it will the system know that it goes to the homes?

it should looks like these than:

ā€œgroupā€: {
ā€œPlayerā€: [
{
ā€œpermissionsā€: {
ā€œtpa.useā€: 1,
ā€œtpa.acceptā€: 1,
ā€œtpahere.useā€: 1,
ā€œtpadeny.useā€: 1,
ā€œminecraft.command.tpā€: 1
},
ā€œoptionsā€: {
ā€œplayerā€ = ā€œ1ā€,
ā€œwarriorā€ = ā€œ2ā€,
ā€œcaptainā€ = ā€œ5ā€,
ā€œstartingbalanceā€: ā€œ100ā€
}
}

.
.
.

"schema-version": 4,
"rank-ladders": {
    "warrior": [
        "index:2",
        "group:Player",
        "essentials.homes.multiple.warrior": 1
    ],
    "captain": [
        "index:3",
        "group:Player",
        "essentials.homes.multiple.captain": 1
    ],
    "player": [
        "index:1",
        "group:Player",
        "essentials.homes.multiple.player": 1
    ]
}

So that rank ladders section you posted is not exactly valid json, and also not correct for PEX. Take a look at https://github.com/PEXPlugins/PermissionsEx/blob/master/permissionsex-core/src/test/resources/ninja/leaping/permissionsex/backend/file/test3to4.post.json for an example of a simple permissions file.

Can anyone tell me if Iā€™ve done anything wrong in the json? I think itā€™s all good but Iā€™m not exactly the best doing this :stuck_out_tongue: http://pastebin.com/Cc7YmLuu

A group inherits data from its parents, so you did parents entirely in reverse of how they should be put.

i guess itā€™s time to write some basic docs :stuck_out_tongue:

1 Like

Ok I see, changed that. Are there any more errors?

OKI have looked at your file, but i donā€™t fully understand it.
I see that you have two ranks (default, moderation) and you have added them some groups.
The groups are the same for one rank, only the difference is in homes and these rewards that I will give the player?
And the same for the second rank?
Is possible to post full PEX config file to have a look at it?
And is needed then to each group put the option ā€œrankā€=ā€œxxā€, where xx is the number of each rank to have the possibility to then switch it?
If is possible can you explain me the complete rank system?

Iā€™m just rambling here, but maybe thereā€™s an easier way than full docs :wink:
Some kind of ā€œdefaultā€ configuration (linked in OP) might be helpful, the same way the original PermissionsEx did. It would give new users something to start from, and might help resolve some questions.

1 Like

I asked for it :slight_smile: but now, Iā€™m preparing it, but need understand some features of PEX and complete some basic permissions from the vanilla, sponge and some basic mods :smiley:

Iā€™m having a hard time setting default permissions. Do I need to manually add every user that joins into the base group Iā€™ve create? If I add a user to the ā€œGruntsā€ group, it works as expected, however I cannot get the default users to take this permission by default. What am I missing?

Using Spong/PEX/Core. Here is the configā€¦

are they not getting permissions or are you just saying that it doesnā€™t assign them the group in the permissions.json?

They get no permissions. A new user is very locked down. They can build n such, but they canā€™t chat, warp, or set home or whatever I have set in the ā€œGruntsā€ group. I thought the partā€¦

"default": {
    "default": [
        {
            "contexts": {
                "srcip": "127.0.0.1"
            },
            "parents": [
                "group:Grunts"
            ]
        }
    ]
}

ā€¦ would do the trick, but it isnā€™t working the way I thought it would.

If I add the user to the ā€œGruntsā€ group, it works perfectly. Ladder works, all that works, but I donā€™t know if there is a way to handle unknown users, or if I have to add everyone that joins. I donā€™t want to have a giant list of users in there if I donā€™t have to.

Yeah, the issue there is youā€™ve added the default parent to the segment restricted to only local users (the contexts part). Add a new segment to the default:default subject (a new object in the subjectā€™s list), and add the parent there.

1 Like

Beautiful! That did the trick!

    "default": {
        "default": [
            {
                "contexts": {
                    "srcip": "127.0.0.1"
                }
            },
			{
                "parents": [
                    "group:Grunts"
                ]
            }
        ]
    }
},

Now the commands work, but the chat doesnā€™t, I think that has to do with the channels in Core though, I can send chats and join channels and what not, but I donā€™t see the chat messages. My admin user sees it though, so I know it is going through. Iā€™ll post back when I figure out that part.

Also, a JSON validator is extremely handy, for those having formatting problems, check this site http://jsonlint.com Itā€™ll show you where your invalid commas and spacing are. :smile:

EDIT
I was missing the permission node for ā€œcore.channel.receiveā€, once I added that, I can see the chats now! w00t!

Do you know how to use ranks and they features?

I got several rank ladders to work by changing the default in the command to staff, and anything else should work as well. Hereā€™re my rank ladders as they ended up in permissions.json:

    "rank-ladders": {
        "default": [
            "group:Tier1",
            "group:Tier2"
        ],
        "staff": [
            "group:Helper",
            "group:Admin",
            "group:Mod",
            "group:Owner"
        ]
    }

@Alfista You might want to see this snippet too. Oh, and the lines 111-118 in the Pastebin you quoted:

    "rank-ladders": {
        "default": [
            "group:Grunts",
            "group:Helpers",
            "group:Mods",
            "group:Admins"
        ]
    }

But I donā€™t fully understand the settings. You have there created two ranks" default and staff. Is it correct? Each rank work independently?
When we work with Default. You have there added 4 groups. When I change the ranks, then the player who I changed the rank will skip from one group to another? Thats the point of the ranks? And all settings and changes are then made in the appropriate group?

I would wish if somebody who has big knowledge of this plugin/mod to make tutorial becasue for somebody its easy to use,but for me i have no idea how to use it or add groups or add premissions and on my server i added Pex and Core and when i am opped i have no premissions to any command why is that?
And i have ā€œop-permission-level=4ā€ set in server.properties :stuck_out_tongue:

Yes, that is correct. Each rank ladder works independently.

If you promote or demote someone within the rank ladder default, they will move from one group to another inside the same rank ladder. For example, promoting someone from Helpers to Mods will remove them from the group Helpers and add them to the group Mods. That is the point of the ranks, yes :slight_smile:

@Lunatic_X: OP is disabled when you install PEX :smile: