Vault Plugin Help

Discussion in 'Plugin Development' started by Fin999888777, Oct 6, 2012.

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

    Fin999888777

    Hey, I've implemented the "Vault" Plugin in my plugin and want to get access to the methods of the economy part, it would be the best if I could use the iConomy methods. I can use the variable economy
    "public static Economy economy = null;"
    but it always gives me "NullPointerException" if I try to use one of the methods like:
    "economy.getName();"

    of cause I know I myself set the variable to "null" but I don't know what I have to set the variable to get it work. I have the setup, that goes like this:
    "private boolean setupEconomy()
    {
    RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
    if (economyProvider != null) {
    economy = economyProvider.getProvider();
    }

    return (economy != null);
    }"

    I hope someone can tell me what I have to do to be able to use the methods without getting errors
    And what do I have to add to my plugin.yml and how to get vault work?
    :D
     
  2. Offline

    newboyhun

    Did you call the setupEconomy() function in your onEnable() ?
     
  3. Offline

    Fin999888777

    yes I called it there
     
  4. what kind of errors you're getting? those of NoClassDefFoundError?
     
  5. Offline

    AlaskanWolf

    I downloaded this and on day 2 it says: [SEVERE] [Fatal Error] :3:33: The reference to entity "ssid" must end with the ";" delimiter. I looked through all of the plugins and when I put this plugin on it showed this error, but it was only with this plugin. I searched through everything that came with this plugin but it didn't show up anywhere.
     
Thread Status:
Not open for further replies.

Share This Page