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


    hi i am having some trouble using vault. i installed it to the plugin folder as a jar and it works on my server that i am currently making, however it only works for me. all other players are not allowed to use the money system i have on it, says they have no permission. the mod for the money has the name of the players added automatically so i am guessing its the vault mod i need to edit. not sure how. i want all new players to have access to the money system, any help would be great.
  2. Offline


    Vault isn't a money system, Vault is a utility plugin that is most likely used by some of your plugins for allowing you to use any of the Economy plugins listed in the supported section. If you're trying to get an economy on your server and don't have one yet I suggest looking at CraftConomy. If you do have an economy already installed, you'll need to get help from them on how to handle permissions.
  3. Offline


    Hey. I read some of the messages posted here and damn xD can people be any more dumb? lol anyways I'm not here for that. Before all, o.o awesome work with Vault. Love it and it saves so much work when developing. I only have this tiny problem, and always had o.o How the hell do I add a permission for all the worlds? I'm using PEx and if I do playeradd(player,perm) it will add it for the world the player is in. If I run through every world, won't do exactly what I want(imagine new worlds are added?). Ofcourse I tried to do the null thing but it gives me an error in Eclipse, "The method playerAdd(Player, String) in the type Permission is not applicable for the arguments (null, Player, String)". I have coded for other people where I'd run through all the words and add them manually, but in this case I want it to be a perfect job. If you know what I mean. Halp? D:

    EDIT: In the meantime I'm using Bukkit.dispatchCommand(Bukkit.getConsoleSender() to send the command to add a player's permission. But I would like to learn this bit for future reference :3 thank you Sleaker!
  4. Offline


    You have to explicitly cast what null you're passing. (World) null should work.
  5. Offline


    I tired to use Vault with PEX to promote a player from one group to another which is decided via my config file.
    Neither Eclipse nor the calls of the Vault methods are emitting errors. While Remote-Debugging I can see, that Vault hooked to PEX.
    But the players group stays the same.

    Here is what I'm doing (it's in the onCommand method).
    2. if (args[0].equalsIgnoreCase("promote") &&
    3. (null != player)) // TESTING! Promote issuing player to promoteGroup
    4. {
    5. World nullWorld = null;
    6. String promoteGroup = getPromoteGroup(player);
    8. if(!perm.playerAddGroup(nullWorld, player.getName(), promoteGroup))
    9. {
    10. sender.sendMessage("Promotion went wrong!");
    11. }
    12. if(!perm.playerRemoveGroup(nullWorld, player.getName(), perm.getPlayerGroups(player)[0])) //remove all groups except promoteGroup in real implementation!
    13. {
    14. sender.sendMessage("Promotion went wrong!");
    15. }
    16. else
    17. {
    18. sender.sendMessage(ChatColor.GREEN + "You have been promoted from Group: " + perm.getPlayerGroups(player)[0] + " to Group: " + promoteGroup);
    19. }
    20. }

    "perm" is the instance of the Vault Permission RSP.
    Both Vault calls "perm. ..." return TRUE and the groups are correctly retrieved from the config file through my get-method. Also, perm.getPlayerGroups(player)[0] delivers the correct current group of the player.
    It seems everything went fine, but no change is happening.

    What am I doing wrong?
    Do I have to issue some kind of reload of PEX afterwards or something?
Thread Status:
Not open for further replies.

Share This Page