I'm having trouble linking to Vault. I have softdepend: [Vault] in my plugin.yml and Vault is installed on the server I'm testing my plugin on, yet Code: getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); is returning null. Anyone have an idea what I could be doing wrong? Still haven't resolved this, help would be greatly appreciated. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Don't bump more than once ever 12 hours or so ( i was told? ) Anway, vault is REALLY easy to set up. This is what I do when I wanna use money: in main class: Code: [FONT=Andale Mono] public static Permission permission = null; public static Economy economy = null; public static Chat chat = null;[/FONT] [FONT=Andale Mono] [/FONT] Put this at top below the class declaration Code: [/FONT] [FONT=Andale Mono][/FONT] [FONT=Andale Mono][code][/FONT] [FONT=Andale Mono] private boolean setupEconomy() { RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); if (economyProvider != null) { economy = economyProvider.getProvider(); } return (economy != null); }[/FONT] [FONT=Andale Mono] [/code][/FONT]
[/FONT][/FONT] [/code][/quote] [/code][/quote][/code][/FONT][/quote] FONT FONT FONT FONT FONT FONT FONT FONT FONT FONT I hate that shit, there's no way to fix it.[/code][/FONT][/quote] God damnit. I keep trying to write something complaining about the way formatting works, but the formatting keeps messing me up EDIT by Moderator: merged posts, please use the edit button instead of double posting.
My stupid font grrrrr public static Permission permission = null; public static Economy economy = null; public static Chat chat = null; need that in main class and 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); }
Yes, what I have in my main class is quite similar to the format it provides, just adapted a little bit to suit my needs for my plugin better. Yet getRegistration() is still returning null. Sorry about the bumping thing, didn't know about the rule on that and was sort of wanting a solution. Thanks though! I'm looking into something right now, I may be able to get it fixed. EDIT: Yep, got it! Apparently I didn't get the fact that Vault itself is simply an API, and not an actual economy plugin.