I was talking a look at some of the most popular of the several dozen Bukkit permissions plugins, and I noticed that in actuality, most of them were doing the exact same thing. They all provided several things:
- Object-level permissions(meaning per-user), Bukkit handled only this
- Group-level permissions(meaning users are in groups, groups have permissions)
- World-level permissions(meaning object- and group-level permissions that override specified ones based on the world)
- Permissions config storage. This is very general, meaning SQL storage, YML storage, JSON storage, or other.
- Group-level metadata. Iām saying this because itās pretty important for chat and stuff.
- Command-line interface. How the user interacts with the plugin
These plugins share almost the exact same infrastructure. Why not put it in Sponge, with sane defaults?
I think we should stop arguing about whether or not to put in a Permissions API. Itās pretty clear that Bukkit did this to some extent, and itās going to be done anyway. What we should instead do is logically separate the Sponge API into ālayersā as Iāve done above. That way, server owners will be able to get what they want without a billion plugins.
For example, multiple permissions plugins offered SQL storage. What if Sponge offered the infrastructure for permissions and an API for permission storage, and plugins could just implement an interface for permissions storage? That way, there would be a single plugin focused on SQL storage, one focused on MongoDB storage, etc. Sponge would provide a default serialization to HOCON or YML, and the server owner could plug in alternate storage plugins if they wish for alternate storage.
And this should happen for all of permissions, or chat, economy, and other related APIs that arenāt necessarily core Minecraft functions. Sponge should provide a layered system that plugins can exchange and register for. That way we have plugins focusing on a specific layer, not a whole bajillion re-discovering the wheel.