If vault throws an exception, it should not be enabled.

This commit is contained in:
KHobbits 2012-01-20 23:04:43 +00:00
parent f5d65371b2
commit 766935871f

View File

@ -120,10 +120,17 @@ public class VaultEco implements Method
@Override
public boolean isCompatible(Plugin plugin)
{
try
{
RegisteredServiceProvider<Economy> ecoPlugin = plugin.getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
return plugin instanceof Vault && ecoPlugin != null && !ecoPlugin.getProvider().getName().equals("Essentials Economy");
}
catch (Exception e)
{
return false;
}
}
@Override
public void setPlugin(Plugin plugin)