mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00: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 changed files with 6 additions and 1 deletions
|
@ -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 a new issue