mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-09 12:30:42 +01:00
If vault throws an exception, it should not be enabled.
This commit is contained in:
parent
f5d65371b2
commit
766935871f
@ -121,8 +121,15 @@ public class VaultEco implements Method
|
|||||||
@Override
|
@Override
|
||||||
public boolean isCompatible(Plugin plugin)
|
public boolean isCompatible(Plugin plugin)
|
||||||
{
|
{
|
||||||
RegisteredServiceProvider<Economy> ecoPlugin = plugin.getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
|
try
|
||||||
return plugin instanceof Vault && ecoPlugin != null && !ecoPlugin.getProvider().getName().equals("Essentials Economy");
|
{
|
||||||
|
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
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user