Discussion in 'Programming' started by TheRealDan, May 29, 2018.

  1. Everyone has heard of, and most of us use, Vault. But is Vault actually well designed?

    Its great that all our plugins can access the same economy, but that economy still has to be handled by a plugin other than Vault, why doesn't vault handle and store the economy itself?

    Just looking for others thoughts and opinions.
  2. Vault is an A.P.I. (application programing interface) and must be loaded as a plugin in bukkit to allow access to it from other plugins loaded, vault is not a plugin itself, it was designed to have a common way to access to any plugin that implements the interfaces provided by Vault using bukkit's services provider
  3. As mentioned before, Vault is an API. Here are some more reasons why Vault is not a full-blown economy plugin or a full-blown permissions plugin:

    - Some servers need a simple permission system with only permission nodes. Other servers might need permission nodes grouped together into permission groups. And some servers might even want a hierarchy in these permissions. Maybe some servers are very custom and have some eleborate permission system that hooks into donation or purchase systems. What would Vault need to implement, were it a standalone permission management plugin? Only the basics of permission nodes? Permission groups? Automatic systems to add permissions to players when they purchase something from a third party service? Some people would want a lightweight permission plugin, others don't. Instead, Vault is merely an API that helps third party plugins share a common interface to access permissions in a simple manner.

    - When it comes to economies, the same problem occurs. Some people might want a basic shop with only a few items in it that are for sale. Other people might want all items and blocks for sale. Maybe there are some people who run a server with custom items that are for sale, items that have NBT tags to differentiate themselves from vanilla items. Maybe there are some servers that have a really custom economy with stuff like inflation, devaluation, etc. What would Vault need to contain, were it a standalone economy plugin? Only the basic functionalities, or also the inflation and devaluation functionalities. Once again, Vault here merely is an API / bridge between an economy plugin and third-party plugins that need some economy integration.

    TL;DR: Vault is merely an API / bridge between plugins for certain things such as economies or permissions, leaving the implementation of these areas to other plugins.
    • Agree Agree x 1
  4. It's an a.p.i that allows others plugins manage economy
  5. I agree with McJeffr. Vault is an API that helps the economy plugins. Like if you want to make an economy plugin - you need to have dependency on Vault. If you want to make plugin that uses economy plugin - you need Vault. Like McJeffr said Vault is bridge between an econom plugin and third-party plugins that need some economy integradion. Idk what others to say.