mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
If vault throws an exception, it should not be enabled.
This commit is contained in:
parent
f5d65371b2
commit
766935871f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user