mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fixed config issues, enabled/disabled info in /acr checks
This commit is contained in:
1 parent
fc006c39f2
commit
656841b046
4 files changed
+32
-30
No files matched your search
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.rammelkast.anticheatreloaded</groupId>
|
||||
<artifactId>AntiCheatReloaded</artifactId>
|
||||
<version>1.9.0-PRE</version>
|
||||
<version>1.9.0</version>
|
||||
<name>AntiCheatReloaded</name>
|
||||
<url>https://www.spigotmc.org/resources/anticheatreloaded.23799/</url>
|
||||
<properties>
|
||||
|
||||
+29
-24
@@ -19,39 +19,44 @@
|
||||
|
||||
package com.rammelkast.anticheatreloaded.command.executors;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
|
||||
import com.rammelkast.anticheatreloaded.check.CheckType;
|
||||
import com.rammelkast.anticheatreloaded.command.CommandBase;
|
||||
import com.rammelkast.anticheatreloaded.manage.CheckManager;
|
||||
import com.rammelkast.anticheatreloaded.util.Permission;
|
||||
|
||||
public class CommandChecks extends CommandBase {
|
||||
|
||||
private static final String NAME = "AntiCheatReloaded Checks Management";
|
||||
private static final String COMMAND = "checks";
|
||||
private static final String USAGE = "anticheat checks";
|
||||
private static final Permission PERMISSION = Permission.SYSTEM_CHECK;
|
||||
private static final String[] HELP = new String[2];
|
||||
private static final String NAME = "AntiCheatReloaded Checks Management";
|
||||
private static final String COMMAND = "checks";
|
||||
private static final String USAGE = "anticheat checks";
|
||||
private static final Permission PERMISSION = Permission.SYSTEM_CHECK;
|
||||
private static final String[] HELP = new String[2];
|
||||
|
||||
static {
|
||||
HELP[0] = GRAY + "Use: " + AQUA + "/anticheat checks" + GRAY + " for a list of checks";
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(GRAY + "Checks: ");
|
||||
for (int i=0;i<CheckType.values().length;i++) {
|
||||
builder.append(CheckType.values()[i]);
|
||||
if (i<CheckType.values().length-1) {
|
||||
builder.append(", ");
|
||||
}
|
||||
}
|
||||
HELP[1] = builder.toString();
|
||||
}
|
||||
static {
|
||||
HELP[0] = GRAY + "Use: " + AQUA + "/anticheat checks" + GRAY + " for a list of checks";
|
||||
StringBuilder builder = new StringBuilder();
|
||||
CheckManager checkManager = AntiCheatReloaded.getManager().getCheckManager();
|
||||
builder.append(GRAY + "Checks: ");
|
||||
for (int i = 0; i < CheckType.values().length; i++) {
|
||||
CheckType type = CheckType.values()[i];
|
||||
builder.append((checkManager.isActive(type) ? ChatColor.GREEN : ChatColor.RED) + type.getName());
|
||||
if (i < CheckType.values().length - 1) {
|
||||
builder.append(", ");
|
||||
}
|
||||
}
|
||||
HELP[1] = builder.toString();
|
||||
}
|
||||
|
||||
public CommandChecks() {
|
||||
super(NAME, COMMAND, USAGE, HELP, PERMISSION);
|
||||
}
|
||||
public CommandChecks() {
|
||||
super(NAME, COMMAND, USAGE, HELP, PERMISSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(CommandSender cs, String[] args) {
|
||||
sendHelp(cs);
|
||||
}
|
||||
@Override
|
||||
protected void execute(CommandSender cs, String[] args) {
|
||||
sendHelp(cs);
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,6 @@ public class CheckManager {
|
||||
for (CheckType type : CheckType.values()) {
|
||||
if (!configuration.getChecks().isEnabled(type)) {
|
||||
checkIgnoreList.add(type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,8 +98,6 @@ speed:
|
||||
# WaterWalk check settings
|
||||
# Checks if a player is walking on water
|
||||
waterwalk:
|
||||
# Should this check be enabled?
|
||||
enabled: true
|
||||
# Checks for vanilla water walking/jumping
|
||||
# Debugs as 'tried to walk on water'
|
||||
walk:
|
||||
@@ -109,14 +107,14 @@ waterwalk:
|
||||
# This combats false positives, while giving hackers not much leniency
|
||||
minimumDistXZ: 0.092
|
||||
# Checks for small hops on top of water
|
||||
# Debugs as 'tried to lunge on water'
|
||||
# Debugs as 'tried to hop on water'
|
||||
hop:
|
||||
# Should this part of the check be enabled?
|
||||
enabled: true
|
||||
# Maximum lunge Y motion to flag
|
||||
maxMotionY: 0.10
|
||||
# Checks for small lunges in water
|
||||
# Debugs as 'tried to walk on water'
|
||||
# Debugs as 'tried to lunge in water'
|
||||
lunge:
|
||||
# Should this part of the check be enabled?
|
||||
enabled: true
|
||||
|
||||
Reference in new issue
Block a user