Vault - A Permissions/Economy API - alternative to Register [STABLE]

Discussion in 'Resources' started by Sleaker, Oct 21, 2011.

Thread Status:
Not open for further replies.
  1. Offline


  2. Offline


    @desht - Looking great! -

    Added a few more plugins to the list on the vault page too.

    If anyone wants to write a bit more of a How-To guide on showing some actual examples after the linking is done and posted the up in WikiCreole on the Vault forum I'd appreciate it much, and I'm sure other prospective devs would like to see it also!
  3. Offline


    new version up today, fixes P3 mutable permissions, and adds some extra compatibility to bPermissions.
  4. Offline


    It seems to return a null Economy variable when using EssentialsEcon and BOSEconomy.
  5. Love it!
    Wish it had maven though..Oh well, can just install manually.
  6. Offline


    responded to your post, you're not checking it properly based on what you linked (as far as I can tell)

    @tips48 - maven is meh :p - and I think ecoCreature that is on our build server uses maven.

    EDIT: took a look at it and it maintains a local download of Vault, annoying since ant can download artifacts from any location you want, while maven seems like it can only download from artifact repositories.

    EDIT2: Maven supports running Ant tasks internally - just use a local dependency in your pom and before you run the maven compile run an Ant task to download the latest RB of a non-maven project via:
  7. Offline


    Anyone want to help me understand how this works, and how to use it? Nub gonna nub.

    @Sleaker I don't really understand how to use this, but I can't send you messages.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 20, 2016
  8. Offline


    @Waffletastic hooking Vault is pretty well described on the front page -

    Once you've hooked whichever part(s) of the API you need (one or more of Permission, Economy, Chat), just follow the javadocs at

    E.g. to charge a player 20 economy credits:
    To check if a player is in some permission group:
  9. Offline


    @tips48 - we just setup a maven artifact for Vault - should be usable now for any project that uses maven.
    tips48 likes this.
  10. Offline


    Wow good god I love this! This api is a lifesaver for when I want to do some simple editing for MY economy even... I like to be flexible, and in the event I ever switch economy plugins, I will still be very well handled. The methods all make sense, and return what you expect. Once again, great work!

    In fact, one of my first plugins, SimpleHotel uses Vault, and without it I would be absolutely nowhere.
  11. Offline


    @Sleaker How would I compile against Vault, so that my users don't have to get the Vault plugin?
  12. Offline


    You don't... That's exactly what we DON'T want. Register allows you to do this and it completely breaks when multiple plugins do it along with trying to run the library.

    Link the Vault page as a required dependency and have your plugin warn when it's enabled (and disable itself if it needs the econ/permission support) if they try to use your plugin without it.
  13. Offline


    Vault now supports MineConomy and eWallet - making it the most inclusive Economy API available!
    WalkerCrouse likes this.
  14. Offline


    This is everything I need and more :)

    So glad I used this. I've used Vault to create an economy converter for RealExchange (iConomy -> RealExchange, etc)
  15. Offline


    Hello, I've been looking on google for a few hours about updating register (its been abandoned I believe?)
    I came across "Vault" and would like to know if I need to change a config or something to take place of register? Or do the plugin developers need to change their code to use vault?
  16. Offline


    plugin devs would need to change their code.
  17. Offline



    First great idead!
    I just started using Vault.

    Is there any way to have Vault optional?
    If Vault & any economy plugin is installed & running -> Use economy
    if Vault isn't installed -> use everything without economy

    Because of the dependency I keep this error without Vault...
    Show Spoiler
    2011-12-01 18:20:19 [SEVERE] Could not load 'plugins\SecretPlugin.jar' in folder 'plugins': Vault
    org.bukkit.plugin.UnknownDependencyException: Vault
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    at org.bukkit.craftbukkit.CraftServer.<init>(
    at net.minecraft.server.ServerConfigurationManager.<init>(
    at net.minecraft.server.MinecraftServer.init(

    Would be awesome if there is any way to do it!
  18. Offline


    The same way you would prevent a hard-error when checking for optional dependencies. before instantiating any of the Vault values or trying to getProvider, check if Vault is loaded. Then put it as a softdepend: [ Vault ] instead ofa depend: [Vault] in your plugin.yml
  19. Offline


    Thx <3
  20. Offline


    looks like I've got a project ahead of me adding to ClearInv, it's about time i added support for economy.
  21. Offline


    Vault now supports bPerms 2.x - as well as doing update threaded update checks every 30 minutes to notify the server of when it's time to update. Hopefully this will keep servers so they don't have outdated versions such as the bPerms update.
  22. Offline


    Hello, I would like to use Vault instead of Register, but i don't understand how to use setupEconomy?
    How can I call the method? I don't find sources.

    Thank you for your help
  23. Offline


    I just want to say, I switched from Register recently. Vault is easy to use and just plain awesome.
  24. Offline


    Do you have a jenkins where we can follow along with the development builds of this? (If exist)
  25. Offline


    I'm not Sleaker, but I happen to know he maintains a Jenkins here: :)

    setupEconomy() is a method you need to provide yourself - but the good news is you can generally just copy & paste one or more of the example methods on the plugin page.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 20, 2016
  26. Offline


    Thank you it works
  27. Offline


    There's not too much development that goes on, usually if I'm going to add something it gets added, tested briefly and pushed as a new version, the interfaces are all written at this point and really only small changes are getting pushed to maintain it. There is the possibility of adding other APIs though at this point, someone suggested a Region API.
  28. Offline


    I wrote a simple plugin that modifies a users group onCommand, and it seems to work with PEX (haven't tested with bPerms), but in GM, the user's group stays the same. permission.playerAddGroup(...) should change the user's group correct? Here's the class I'm referring to.
  29. Offline


    @PatrickFreed - GM handles groups in an odd way to the point that I have no drive/desire to write compatibility for adding/removing groups with GM. It has a Primary Group and all other groups are secondary. but Vault/every other permission system does not indicate a primary group in this way (except through internal weighting sometimes). Which leads me to the sticky situation of not knowing how to handle group removal.

    So if GM wants to add addGroup and removeGroup to their API I'll definetely hook them. Until then, it's doubtful.
    Also, this is why Vault returns success/failure messages. If you're hooking Vault you MUST listen to the messages otherwise your plugin will have issues where you're telling everyone yes it worked! When vault actually returned a failure notification.
    PatrickFreed likes this.
  30. Offline


    added CurrencyCore support to latest version!
Thread Status:
Not open for further replies.

Share This Page