mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-25 16:09:44 +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 (vaultAPI != null && vaultAPI.isEnabled()) {
|
||||||
if (!(handler instanceof VaultHandler)) {
|
if (!(handler instanceof VaultHandler)) {
|
||||||
VaultHandler vault = new VaultHandler(ess);
|
VaultHandler vault = new VaultHandler(ess);
|
||||||
if (vault.setupPermissions()) {
|
if (vault.setupProviders()) {
|
||||||
LOGGER.log(Level.INFO, "Essentials: Using Vault based permissions.");
|
LOGGER.log(Level.INFO, "Essentials: Using Vault based permissions.");
|
||||||
handler = vault;
|
handler = vault;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,10 @@ public class VaultHandler extends SuperpermsHandler {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setupPermissions() {
|
public boolean setupProviders() {
|
||||||
try {
|
try {
|
||||||
Class.forName("net.milkbowl.vault.permission.Permission");
|
Class.forName("net.milkbowl.vault.permission.Permission");
|
||||||
|
Class.forName("net.milkbowl.vault.chat.Chat");
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue