use of com.gamingmesh.jobs.economy.BlackholeEconomy in project Jobs by GamingMesh.
the class HookEconomyTask method run.
public void run() {
Plugin test = Bukkit.getServer().getPluginManager().getPlugin("Vault");
if (test != null) {
RegisteredServiceProvider<Economy> provider = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
if (provider != null) {
Economy economy = provider.getProvider();
if (economy != null && economy.isEnabled()) {
Jobs.setEconomy(plugin, new VaultEconomy(economy));
Jobs.getPluginLogger().info("[" + plugin.getDescription().getName() + "] Successfully linked with Vault.");
return;
}
}
}
// no Vault found
Jobs.setEconomy(plugin, new BlackholeEconomy());
Bukkit.getServer().getLogger().severe("==================== " + plugin.getDescription().getName() + " ====================");
Bukkit.getServer().getLogger().severe("Vault is required by this plugin for economy support!");
Bukkit.getServer().getLogger().severe("Please install Vault first!");
Bukkit.getServer().getLogger().severe("You can find the latest version here:");
Bukkit.getServer().getLogger().severe("http://dev.bukkit.org/server-mods/vault/");
Bukkit.getServer().getLogger().severe("==============================================");
}
Aggregations