MilkBowl / Vault

Vault of common APIs for Bukkit Plugins
GNU Lesser General Public License v3.0
493 stars 350 forks source link

[Feature Request / idea] Permissions plugin hooking into Vault #839

Closed EmnichtdaYT closed 3 years ago

EmnichtdaYT commented 3 years ago

Hey. I decided to code my own custom permissions plugin for my own server. Every other plugin we use depends on Vault, so I have to (fork) code my own version of Vault. I just looked at the source code of Vault and came up with this cool idea.

Imagine a new permissions plugin gets created and becomes popular. Currently Vault hooks into the permissions plugin so you would have to add the new permissions plugin to Vault.

Why don’t you create a API which allows permission plugin programmers to register their permission plugin to vault. That would actually be pretty easy given the source code you have rn. Just give a way to register a child class of "Permission" and load it using the hookPermission method. I would be the first one to use it. That would be rly cool.

(I'm sorry if my english is not perfect, it is not my mother tongue)

EmnichtdaYT commented 3 years ago

grafik Well I am just stupid lol, there is a way to do that already 🤦

Sleaker commented 3 years ago

@EmnichtdaYT not stupid, but not necessarily immediately apparent! But yeah, the intention now is that any plugin can implement the Vault interface. you just need to register it to the bukkit services API just like Vault does with the hookPermission/hookEconomy. Glad you were able to figure it out!