Vault

Vault

7M Downloads

Vault is not working properly with PermissionsBukkit

Staartvin opened this issue ยท 4 comments

commented

I have a plugin (Autorank) which relies on Vault for most permission plugins. I noticed that Vault doesn't get the rank of a player with PermissionsBukkit. Vault does get the correct groups if you ask all groups but it can't get the correct groups of a player. It returns just an empty string.

commented

Sounds like you're either using world-specific groups and the plugin you're working with is only checking global groups or vice-versa.

commented

permission.getPlayerGroups("Staartvin") doesn't return anything with PermissionsBukkit. If I use the PermissionsBukkit API though, it works like it should.

And yes, I made sure my name exists in the PermissionsBukkit file. It works with the PermissionsBukkit API but not with Vault. I have made a seperate class to have support for PermissionsBukkit, but it would be good if Vault does that for me instead of my own class.

commented

as I suggested before, make sure you're using either world specific, or world-unspecific calls. getPlayerGroups does not take a string, it takes a Player object, if you use this method it will return groups specific to the player in their current world, not global groups.

Please read the documentation, as it is very clear what it's going to return: https://github.com/MilkBowl/Vault/blob/master/src/net/milkbowl/vault/permission/Permission.java#L601

commented

I'll try using getPlayerGroups(null, player.getName()) and I'll post the results.