Closed ZuVEnO closed 3 years ago
First of all: Do NOT use the internal minecraft logger. Why do people do this?
Additionally: what exactly is the issue here? I personally use
try {
Class<?> clazz = net.milkbowl.vault.economy.Economy.class;
RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager().getRegistration(clazz);
if (economyProvider != null) {
eco = economyProvider.getProvider();
}
} catch (NoClassDefFoundError e) {
useVault = false;
eco = null;
return false;
}
useVault = (eco != null);
return useVault;//Sets useVault to the inverse of whether the Economy is null, and returns it.
as init code; so pretty much the same as yours.
Another tip: Always init the economy lazily, if the economy plugin loads after you you will have issues, so obtain the economy as late as possible.
My plugin can't explore Vault plugin, but code included in plugin & as dependencie...
Here's code:
Here's plugin.yml