mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-27 23:27:33 +02:00
Fix ClassNotFoundException when vault is missing (#4151)
This commit is contained in:
parent
c9310ea429
commit
02193b0523
@ -207,8 +207,13 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad() {
|
public void onLoad() {
|
||||||
// Vault registers their Essentials provider at low priority, so we have to use normal priority here
|
try {
|
||||||
getServer().getServicesManager().register(net.milkbowl.vault.economy.Economy.class, new VaultEconomyProvider(this), this, ServicePriority.Normal);
|
// Vault registers their Essentials provider at low priority, so we have to use normal priority here
|
||||||
|
Class.forName("net.milkbowl.vault.economy.Economy");
|
||||||
|
getServer().getServicesManager().register(net.milkbowl.vault.economy.Economy.class, new VaultEconomyProvider(this), this, ServicePriority.Normal);
|
||||||
|
} catch (final ClassNotFoundException ignored) {
|
||||||
|
// Probably safer than fetching for the plugin as bukkit may not have marked it as enabled at this point in time
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user