1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-29 04:18:07 +01:00

fix(vault): check vault before checking providers

Because of the new providers hookers, a use of the proviers class was
perform before checking if Vault was enabled. And if Vault was not
enabled there was a `NoClassDefFoundError`.
Now a first Vault check is done before the use of the providers class.
This commit is contained in:
MachiganMC 2023-10-07 02:42:52 +02:00
parent 72f745aeb3
commit 8fcbcdd80d

View File

@ -720,11 +720,14 @@ public final class Jobs extends JavaPlugin {
complement = new Complement1();
}
// register economy
CMIScheduler.get().runTask(() -> new HookEconomyTask(net.milkbowl.vault.economy.Economy.class));
if (HookVault.isVaultEnable()) {
// register economy
CMIScheduler.get().runTask(() -> new HookEconomyTask(net.milkbowl.vault.economy.Economy.class));
// register permission from vault
CMIScheduler.get().runTask(() -> new HookPermissionTask(Permission.class));
}
// register permission from vault
CMIScheduler.get().runTask(() -> new HookPermissionTask(Permission.class));
dao.loadBlockProtection();
getExploreManager().load();