Vault

Vault

7M Downloads

Add World support for PEX Connector

Staartvin opened this issue ยท 9 comments

commented

Whenever I invoke the 'playerAddGroup(String world, String player, String group)' of the Permission class of Vault, it seems to rank a player on global while using PEX.

My plugin tries to add the player to a new group on a certain world. Instead, Vault ranks the player 'globally'. It just ignores the world. When I check my PEX config, the player is ranked globally and the world is not used.

I've updated both Vault and PermissionsEx. I made sure that the world exists.
Whenever I perform the 'pex user Staartvin group set ' it does work. The world used for the method is exactly the same as the world used in the command. Therefore, this is an issue with Vault and PEX.

Any ideas how to fix this?

commented

PEX groups are not per-world last I checked, this may have changed in patches, but the PEX connector does not take into account worlds, it simply grabs the group and adds it to the player, previously if a group was in a world, it couldn't also be global as having dual-state groups doesn't make sense, again if this has changed, or if the groups are handled differently then what you're suggesting is going to happen.

commented

Well, as it seems right now, PEX gets the group of the player via the world. If no world was found in the config, then it uses the global group.

Example:
http://pbrd.co/15H26oS

Whenever a player is in 'Main_World' he will be in the 'Hero' group.
If he is in another world he will be in the 'Member' group.

It seems Vault does not allow to set a player into a group on a specific world.
It also doesn't work when you try to get the group of the player in a specific world. It will always return the global group.

commented

At the moment that's intended. the PEX connector only works with Global Groups.
I've reworded the issue title as a feature enhancement as this is not a bug.

commented

Okay, thanks. I hope to see an addition of the world specific ranking :)

commented

Thank you.

commented

Just to make sure: will this also allow you to grab the groups of a player on a specific world?

commented

Okay, I hope you do. I'll be watching the commits for a while!

commented

ah no, that would require breaking compatibility of all Perm APIs that I don't have directly in Vault.

commented

@Staartvin - I'll look into adding some more API in the next release, I haven't cycled the major version in a while, and I'm pretty sure a lot of the item code is going to be getting redesigned from Bukkit for 1.7/1.8 especially on MC, so I may be needing to change some of that API also.