[Untested] [Experimental] PermissionsHandler cleanup, add specific logging to detect Vault with no perms plugin

This commit is contained in:
vemacs 2015-06-19 15:47:58 -04:00
parent 6ca3712b79
commit a6232b6bb6
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.perm;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.perm.impl.*;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.Arrays;
@ -125,7 +126,10 @@ public class PermissionsHandler implements IPermissionsHandler {
((SuperpermsHandler) handler).getEnabledPermsPlugin() + " without Vault installed.");
ess.getLogger().warning("Features such as chat prefixes/suffixes and group-related functionality will not " +
"work until you install Vault.");
} else {
} else if (Bukkit.getPluginManager().getPlugin("Vault") != null) {
ess.getLogger().info("Detected Vault but no supported permissions plugin. Using superperms based permissions.");
}
{
ess.getLogger().info("Using superperms-based permissions.");
}
} else if (handler instanceof ConfigPermissionsHandler) {

View File

@ -66,6 +66,7 @@ public abstract class AbstractVaultHandler extends SuperpermsHandler {
}
public boolean canLoad() {
if (Bukkit.getPluginManager().getPlugin("Vault") == null) return false;
try {
return setupProviders();
} catch (Throwable t) {