Vault

Vault

7M Downloads

[Feature Request] Plugin Priorities

MeMyselfMC opened this issue ยท 7 comments

commented

Hello,

Would it be possible to add a feature where we would be able to choose which plugin takes priority to hook into Vault? For example, let's say I have 2 economy plugins installed which both support Vault, PlayerPoints and EssentialsEco. With a command (e.x /vault priority economy {Plugin}), I am able to choose which plugin will hook into Vault first, which pretty much means which plugin will be used for economy through Vault.

Thanks for your time,
John

commented

Priorities can't be changed at runtime. The only option would be to add in a configuration value for each of the builtins. I'm unlikely to do this as I don't have control over all connectors. PlayerPoints isn't supported directly in Vault you could ask for this option from them.

commented

Ah, okay. I understand. I guess I'm going to find another way to work around this issue.

commented

Same for permissions?

commented

@SirWilli - all of the connectors both provided by Vault or by external plugins that provide their own have priorities. Generally external plugins set their priority to Highest as if you're using them you'll want them to take over default operation. When it comes to having two installed at once priorities only do the job of defaults. Split functionality is a much more advanced topic that is supported inherently, but most programs don't think about it so they don't give good options on how to seperate out the different pieces.

commented

Hm, so there is no way to check the permissions in plugin X and then in Y?
For example:
If the player does have the permission in one of them or both vault will say that he has the permission.
If the player has the permission in X but the permission is set to false in Y vault will say that he doesn't have the permission.

commented

I think you misunderstand what Vault does @SirWilli. Vault is simply a set of templates that define what a contract should look like. The contract is supplied per-permission plugin. If multiple permission plugins are installed then you have multiple contracts available to utilize. Which one gets utilized is determined either by a plugin requesting the one with the highest priority, or by a plugin getting a list of all of them, and deciding of it's own logic which one to use. Vault does not store the contracts, the bukkit API handles all of that. So in essence, all Vault really does is provide the template for the contracts that permission plugins are supposed to use, nothing else.

As far as permissions are concerned all of them should be registered in bukkit. You shouldn't be checking Vault for permissions unless it's for offline players (which maybe you do want to do that).

commented

Oh okay.