Remove redundant config option

This commit is contained in:
Luck
2016-10-27 18:48:38 +01:00
Unverified
parent 7acc8bc7ed
commit 66f756575a
12 changed files with 12 additions and 28 deletions
@@ -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());
}
}
@@ -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);
}
}
+3 -3
View File
@@ -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:
@@ -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());
}
}
-3
View File
@@ -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:
@@ -103,7 +103,7 @@ public class LPConfigurationLink implements LPConfiguration {
@Override
public boolean getDebugPermissionChecks() {
return master.isDebugPermissionChecks();
return false; // Constant TODO depreciate this
}
@Override
@@ -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<PermissionProcessor> processors;
private final LoadingCache<String, Tristate> 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;
}
@@ -60,7 +60,6 @@ public abstract class AbstractConfiguration<T extends LuckPermsPlugin> 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<T extends LuckPermsPlugin> implement
private boolean vaultPrimaryGroupOverridesCheckInherited;
private boolean vaultPrimaryGroupOverridesCheckExists;
private boolean vaultPrimaryGroupOverridesCheckMemberOf;
private boolean vaultDebug;
private Map<String, String> worldRewrites;
private Map<String, String> groupNameRewrites;
private List<Rule> defaultAssignments;
@@ -110,7 +110,6 @@ public abstract class AbstractConfiguration<T extends LuckPermsPlugin> 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<T extends LuckPermsPlugin> 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()));
@@ -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<String, String> getWorldRewrites();
Map<String, String> getGroupNameRewrites();
@@ -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());
}
}
@@ -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);
}
-3
View File
@@ -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 {