diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java index dc1f4469..1ddef39f 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java @@ -56,6 +56,6 @@ public class BukkitCalculatorFactory implements CalculatorFactory { } processors.add(new DefaultsProcessor(contexts.isOp(), plugin.getDefaultsProvider())); - return new PermissionCalculator(plugin, user.getName(), plugin.getConfiguration().isDebugPermissionChecks(), processors.build()); + return new PermissionCalculator(plugin, user.getName(), processors.build()); } } diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java index 484e42d6..7b8dcec1 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java @@ -70,7 +70,7 @@ public class VaultPermissionHook extends Permission { } public void log(String s) { - if (plugin.getConfiguration().isDebugPermissionChecks()) { + if (plugin.getConfiguration().isVaultDebug()) { plugin.getLog().info("[VAULT] " + s); } } diff --git a/bukkit/src/main/resources/config.yml b/bukkit/src/main/resources/config.yml index 6c779331..d2bbc409 100644 --- a/bukkit/src/main/resources/config.yml +++ b/bukkit/src/main/resources/config.yml @@ -46,9 +46,6 @@ online-mode: true # If the plugin should send log notifications to users whenever permissions are modified. log-notify: true -# If LuckPerms should print to console every time a plugin checks if a player has a permission -debug-permission-checks: false - @@ -125,6 +122,9 @@ vault-primary-groups-overrides: # If LuckPerms should check if the user is actually a member of the group check-user-member-of: true +# If LuckPerms should print debugging info to console when a plugin uses a Vault function +vault-debug: false + # Mirrors world names. Whenever LuckPerms checks what world a user is in, if the world name is in this list, the value assigned # will be sent forward for permission calculation instead. world-rewrite: diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java index 1d9c18fe..6ad91f0c 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java @@ -43,6 +43,6 @@ public class BungeeCalculatorFactory implements CalculatorFactory { processors.add(new RegexProcessor()); } - return new PermissionCalculator(plugin, user.getName(), plugin.getConfiguration().isDebugPermissionChecks(), processors.build()); + return new PermissionCalculator(plugin, user.getName(), processors.build()); } } diff --git a/bungee/src/main/resources/config.yml b/bungee/src/main/resources/config.yml index 100e36d2..da8716e8 100644 --- a/bungee/src/main/resources/config.yml +++ b/bungee/src/main/resources/config.yml @@ -46,9 +46,6 @@ online-mode: true # If the plugin should send log notifications to users whenever permissions are modified. log-notify: true -# If LuckPerms should print to console every time a plugin checks if a player has a permission -debug-permission-checks: false - # Mirrors world names. Whenever LuckPerms checks what world a user is in, if the world name is in this list, the value assigned # will be sent forward for permission calculation instead. world-rewrite: diff --git a/common/src/main/java/me/lucko/luckperms/common/api/internal/LPConfigurationLink.java b/common/src/main/java/me/lucko/luckperms/common/api/internal/LPConfigurationLink.java index 99732e08..a52e0895 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/internal/LPConfigurationLink.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/internal/LPConfigurationLink.java @@ -103,7 +103,7 @@ public class LPConfigurationLink implements LPConfiguration { @Override public boolean getDebugPermissionChecks() { - return master.isDebugPermissionChecks(); + return false; // Constant TODO depreciate this } @Override diff --git a/common/src/main/java/me/lucko/luckperms/common/calculators/PermissionCalculator.java b/common/src/main/java/me/lucko/luckperms/common/calculators/PermissionCalculator.java index 564a00d6..eb4fcd95 100644 --- a/common/src/main/java/me/lucko/luckperms/common/calculators/PermissionCalculator.java +++ b/common/src/main/java/me/lucko/luckperms/common/calculators/PermissionCalculator.java @@ -39,7 +39,6 @@ import java.util.Map; public class PermissionCalculator { private final LuckPermsPlugin plugin; private final String objectName; - private final boolean debug; private final List processors; private final LoadingCache cache = CacheBuilder.newBuilder() @@ -57,12 +56,7 @@ public class PermissionCalculator { public Tristate getPermissionValue(String permission) { permission = permission.toLowerCase(); Tristate t = cache.getUnchecked(permission); - plugin.getDebugHandler().printOutput(objectName, permission, t); - if (debug) { - plugin.getLog().info("Checking if " + objectName + " has permission: " + permission + " - (" + t.toString() + ")"); - } - return t; } diff --git a/common/src/main/java/me/lucko/luckperms/common/config/AbstractConfiguration.java b/common/src/main/java/me/lucko/luckperms/common/config/AbstractConfiguration.java index 397f62e8..994cf806 100644 --- a/common/src/main/java/me/lucko/luckperms/common/config/AbstractConfiguration.java +++ b/common/src/main/java/me/lucko/luckperms/common/config/AbstractConfiguration.java @@ -60,7 +60,6 @@ public abstract class AbstractConfiguration implement private boolean applyingRegex; private boolean applyingShorthand; private boolean logNotify; - private boolean debugPermissionChecks; private boolean opsEnabled; private boolean commandsAllowOp; private boolean autoOp; @@ -71,6 +70,7 @@ public abstract class AbstractConfiguration implement private boolean vaultPrimaryGroupOverridesCheckInherited; private boolean vaultPrimaryGroupOverridesCheckExists; private boolean vaultPrimaryGroupOverridesCheckMemberOf; + private boolean vaultDebug; private Map worldRewrites; private Map groupNameRewrites; private List defaultAssignments; @@ -110,7 +110,6 @@ public abstract class AbstractConfiguration implement applyingRegex = getBoolean("apply-regex", true); applyingShorthand = getBoolean("apply-shorthand", true); logNotify = getBoolean("log-notify", true); - debugPermissionChecks = getBoolean("debug-permission-checks", false); autoOp = getBoolean("auto-op", false); opsEnabled = !isAutoOp() && getBoolean("enable-ops", true); commandsAllowOp = getBoolean("commands-allow-op", true); @@ -121,6 +120,7 @@ public abstract class AbstractConfiguration implement vaultPrimaryGroupOverridesCheckInherited = getBoolean("vault-primary-groups-overrides.check-inherited-permissions", false); vaultPrimaryGroupOverridesCheckExists = getBoolean("vault-primary-groups-overrides.check-group-exists", true); vaultPrimaryGroupOverridesCheckMemberOf = getBoolean("vault-primary-groups-overrides.check-user-member-of", true); + vaultDebug = getBoolean("vault-debug", false); worldRewrites = ImmutableMap.copyOf(getMap("world-rewrite", Collections.emptyMap())); groupNameRewrites = ImmutableMap.copyOf(getMap("group-name-rewrite", Collections.emptyMap())); diff --git a/common/src/main/java/me/lucko/luckperms/common/config/LPConfiguration.java b/common/src/main/java/me/lucko/luckperms/common/config/LPConfiguration.java index 3cd3c62b..ab1f6f73 100644 --- a/common/src/main/java/me/lucko/luckperms/common/config/LPConfiguration.java +++ b/common/src/main/java/me/lucko/luckperms/common/config/LPConfiguration.java @@ -64,8 +64,6 @@ public interface LPConfiguration { boolean isLogNotify(); - boolean isDebugPermissionChecks(); - boolean isOpsEnabled(); boolean isCommandsAllowOp(); @@ -86,6 +84,8 @@ public interface LPConfiguration { boolean isVaultPrimaryGroupOverridesCheckMemberOf(); + boolean isVaultDebug(); + Map getWorldRewrites(); Map getGroupNameRewrites(); diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java index f77276d8..73225a77 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java @@ -48,6 +48,6 @@ public class SpongeCalculatorFactory implements CalculatorFactory { } processors.add(new DefaultsProcessor(plugin.getService(), LuckPermsService.convertContexts(contexts.getContexts()))); - return new PermissionCalculator(plugin, user.getName(), plugin.getConfiguration().isDebugPermissionChecks(), processors.build()); + return new PermissionCalculator(plugin, user.getName(), processors.build()); } } diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java index dade49d9..bbb974af 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java @@ -80,10 +80,6 @@ public class UserCollection implements SubjectCollection { return s.get(); } - if (service.getPlugin().getConfiguration().isDebugPermissionChecks()) { - service.getPlugin().getLog().warn("Couldn't get user subject for: " + id); - } - // Fallback to the other collection. This Subject instance will never be persisted. return fallback.get(id); } diff --git a/sponge/src/main/resources/luckperms.conf b/sponge/src/main/resources/luckperms.conf index 6ff916b2..40d1e32d 100644 --- a/sponge/src/main/resources/luckperms.conf +++ b/sponge/src/main/resources/luckperms.conf @@ -42,9 +42,6 @@ online-mode=true # If the plugin should send log notifications to users whenever permissions are modified. log-notify=true -# If LuckPerms should print to console every time a plugin checks if a player has a permission -debug-permission-checks=false - # Mirrors world names. Whenever LuckPerms checks what world a user is in, if the world name is in this list, the value assigned # will be sent forward for permission calculation instead. world-rewrite {