Solved Hooking into Vault returns NULL

Discussion in 'Spigot Plugin Development' started by WiseHollow, Oct 14, 2016.

Thread Status:
Not open for further replies.
  1. Hi, I am writing a plugin that uses the economy portion of Vault. I do not have any other plugins on this server except for mine, and Vault. I have the softdepends in my plugin yml. The following code returns false at 'if(rsp == null)'....
    Code (Text):

    private boolean setupEconomy()
    {
        if (getServer().getPluginManager().getPlugin("Vault") == null)
        {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp =  getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null)
        {
            return false;
        }
        economy = rsp.getProvider();
        return (economy != null);
    }
     
    Can anyone help me solve this? o_O

    EDIT: Solved it. I needed an economy plugin.
     
Thread Status:
Not open for further replies.