mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-08 03:50:06 +01:00
[Untested] [Experimental] PermissionsHandler cleanup, add specific logging to detect Vault with no perms plugin
This commit is contained in:
parent
6ca3712b79
commit
a6232b6bb6
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user