mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Rename Vault setup method to be more descriptive, check if Chat class is available
This commit is contained in:
parent
fe5de8a854
commit
ea4c966003
2 changed files with 3 additions and 2 deletions
|
@ -101,7 +101,7 @@ public class PermissionsHandler implements IPermissionsHandler {
|
|||
if (vaultAPI != null && vaultAPI.isEnabled()) {
|
||||
if (!(handler instanceof VaultHandler)) {
|
||||
VaultHandler vault = new VaultHandler(ess);
|
||||
if (vault.setupPermissions()) {
|
||||
if (vault.setupProviders()) {
|
||||
LOGGER.log(Level.INFO, "Essentials: Using Vault based permissions.");
|
||||
handler = vault;
|
||||
}
|
||||
|
|
|
@ -19,9 +19,10 @@ public class VaultHandler extends SuperpermsHandler {
|
|||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public boolean setupPermissions() {
|
||||
public boolean setupProviders() {
|
||||
try {
|
||||
Class.forName("net.milkbowl.vault.permission.Permission");
|
||||
Class.forName("net.milkbowl.vault.chat.Chat");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue