mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Fix ClassNotFoundException when vault is missing (#4151)
This commit is contained in:
parent
c9310ea429
commit
02193b0523
1 changed files with 7 additions and 2 deletions
|
@ -207,8 +207,13 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
|||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
// Vault registers their Essentials provider at low priority, so we have to use normal priority here
|
||||
getServer().getServicesManager().register(net.milkbowl.vault.economy.Economy.class, new VaultEconomyProvider(this), this, ServicePriority.Normal);
|
||||
try {
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue