Ready for pre-release; Removed broken code, finished config migrations and fixed false positive

This commit is contained in:
Rammelkast committed 2020-07-20 21:39:53 +02:00
1 parent 07f3c3abce
commit 168c25e5d2
16 files changed
+156 -313

No files matched your search

-1
View File
@@ -44,7 +44,6 @@ Hacks blocked
* FastProjectile * FastProjectile
* ItemSpam * ItemSpam
* FastInventory * FastInventory
* AutoTool
* MorePackets/Timer * MorePackets/Timer
* BadPackets * BadPackets
* Velocity/Anti-Knockback * Velocity/Anti-Knockback
@@ -77,7 +77,6 @@ public class Backend {
private Map<UUID, Long> lastInventoryTime = new HashMap<UUID, Long>(); private Map<UUID, Long> lastInventoryTime = new HashMap<UUID, Long>();
private Map<UUID, Long> inventoryTime = new HashMap<UUID, Long>(); private Map<UUID, Long> inventoryTime = new HashMap<UUID, Long>();
private Map<UUID, Integer> inventoryClicks = new HashMap<UUID, Integer>(); private Map<UUID, Integer> inventoryClicks = new HashMap<UUID, Integer>();
private Map<UUID, Material> itemInHand = new HashMap<UUID, Material>();
private HashSet<Byte> transparent = new HashSet<Byte>(); private HashSet<Byte> transparent = new HashSet<Byte>();
private Map<UUID, Long> lastFallPacket = new HashMap<UUID, Long>(); private Map<UUID, Long> lastFallPacket = new HashMap<UUID, Long>();
private Map<UUID, Integer> fastSneakViolations = new HashMap<UUID, Integer>(); private Map<UUID, Integer> fastSneakViolations = new HashMap<UUID, Integer>();
@@ -167,7 +166,8 @@ public class Backend {
float f = (float) ticks / 20.0F; float f = (float) ticks / 20.0F;
f = (f * f + f * 2.0F) / 3.0F; f = (f * f + f * 2.0F) / 3.0F;
f = f > 1.0F ? 1.0F : f; f = f > 1.0F ? 1.0F : f;
if (Math.abs(force - f) > magic.BOW_ERROR()) { double bowError = checksConfig.getDouble(CheckType.FAST_BOW, "bowError");
if (Math.abs(force - f) > bowError) {
return new CheckResult(CheckResult.Result.FAILED, return new CheckResult(CheckResult.Result.FAILED,
"fired their bow too fast (actual force=" + force + ", calculated force=" + f + ")"); "fired their bow too fast (actual force=" + force + ", calculated force=" + f + ")");
} else { } else {
@@ -177,16 +177,18 @@ public class Backend {
public CheckResult checkProjectile(Player player) { public CheckResult checkProjectile(Player player) {
incrementOld(player, projectilesShot, 10); incrementOld(player, projectilesShot, 10);
int projectilesToWait = checksConfig.getInteger(CheckType.FAST_PROJECTILE, "projectilesToWait");
if (!projectileTime.containsKey(player.getUniqueId())) { if (!projectileTime.containsKey(player.getUniqueId())) {
projectileTime.put(player.getUniqueId(), System.currentTimeMillis()); projectileTime.put(player.getUniqueId(), System.currentTimeMillis());
return new CheckResult(CheckResult.Result.PASSED); return new CheckResult(CheckResult.Result.PASSED);
} else if (projectilesShot.get(player.getUniqueId()) == magic.PROJECTILE_CHECK()) { } else if (projectilesShot.get(player.getUniqueId()) == projectilesToWait) {
long time = System.currentTimeMillis() - projectileTime.get(player.getUniqueId()); long time = System.currentTimeMillis() - projectileTime.get(player.getUniqueId());
int minimumTime = checksConfig.getInteger(CheckType.FAST_PROJECTILE, "minimumTime");
projectileTime.remove(player.getUniqueId()); projectileTime.remove(player.getUniqueId());
projectilesShot.remove(player.getUniqueId()); projectilesShot.remove(player.getUniqueId());
if (time < magic.PROJECTILE_TIME_MIN()) { if (time < minimumTime) {
return new CheckResult(CheckResult.Result.FAILED, "wound up a bow too fast (actual time=" + time return new CheckResult(CheckResult.Result.FAILED,
+ ", min time=" + magic.PROJECTILE_TIME_MIN() + ")"); "wound up a bow too fast (actual time=" + time + ", min time=" + minimumTime + ")");
} }
} }
return PASS; return PASS;
@@ -194,24 +196,25 @@ public class Backend {
public CheckResult checkFastDrop(Player player) { public CheckResult checkFastDrop(Player player) {
incrementOld(player, blocksDropped, 10); incrementOld(player, blocksDropped, 10);
int dropsToWait = checksConfig.getInteger(CheckType.ITEM_SPAM, "dropsToWait");
if (!blockTime.containsKey(player.getUniqueId())) { if (!blockTime.containsKey(player.getUniqueId())) {
blockTime.put(player.getUniqueId(), System.currentTimeMillis()); blockTime.put(player.getUniqueId(), System.currentTimeMillis());
return new CheckResult(CheckResult.Result.PASSED); return new CheckResult(CheckResult.Result.PASSED);
} else if (blocksDropped.get(player.getUniqueId()) == magic.DROP_CHECK()) { } else if (blocksDropped.get(player.getUniqueId()) == dropsToWait) {
long time = System.currentTimeMillis() - blockTime.get(player.getUniqueId()); long time = System.currentTimeMillis() - blockTime.get(player.getUniqueId());
int minimumTime = checksConfig.getInteger(CheckType.ITEM_SPAM, "minimumTime");
blockTime.remove(player.getUniqueId()); blockTime.remove(player.getUniqueId());
blocksDropped.remove(player.getUniqueId()); blocksDropped.remove(player.getUniqueId());
if (time < magic.DROP_TIME_MIN()) { if (time < minimumTime) {
return new CheckResult(CheckResult.Result.FAILED, return new CheckResult(CheckResult.Result.FAILED,
"dropped an item too fast (actual time=" + time + ", min time=" + magic.DROP_TIME_MIN() + ")"); "dropped an item too fast (actual time=" + time + ", min time=" + minimumTime + ")");
} }
} }
return PASS; return PASS;
} }
public CheckResult checkSpider(Player player, double y) { public CheckResult checkSpider(Player player, double y) {
if (y <= magic.LADDER_Y_MAX() && y >= magic.LADDER_Y_MIN() if (y <= 0.11761 && y >= 0.11759 && !Utilities.isClimbableBlock(player.getLocation().getBlock())
&& !Utilities.isClimbableBlock(player.getLocation().getBlock())
&& !Utilities.isClimbableBlock(player.getEyeLocation().getBlock()) && !Utilities.isClimbableBlock(player.getEyeLocation().getBlock())
&& !Utilities.isClimbableBlock(player.getLocation().clone().add(0, -0.98, 0).getBlock())) { && !Utilities.isClimbableBlock(player.getLocation().clone().add(0, -0.98, 0).getBlock())) {
return new CheckResult(CheckResult.Result.FAILED, return new CheckResult(CheckResult.Result.FAILED,
@@ -271,10 +274,11 @@ public class Backend {
public CheckResult checkSprintHungry(PlayerToggleSprintEvent event) { public CheckResult checkSprintHungry(PlayerToggleSprintEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
int sprintFoodMin = checksConfig.getInteger(CheckType.SPRINT, "sprintFoodMin");
if (event.isSprinting() && player.getGameMode() != GameMode.CREATIVE if (event.isSprinting() && player.getGameMode() != GameMode.CREATIVE
&& player.getFoodLevel() <= magic.SPRINT_FOOD_MIN()) { && player.getFoodLevel() <= sprintFoodMin) {
return new CheckResult(CheckResult.Result.FAILED, return new CheckResult(CheckResult.Result.FAILED,
"sprinted while hungry (food=" + player.getFoodLevel() + ", min=" + magic.SPRINT_FOOD_MIN() + ")"); "sprinted while hungry (food=" + player.getFoodLevel() + ", min=" + sprintFoodMin + ")");
} else { } else {
return PASS; return PASS;
} }
@@ -358,7 +362,8 @@ public class Backend {
} }
public boolean isEating(Player player) { public boolean isEating(Player player) {
return startEat.containsKey(player.getUniqueId()) && startEat.get(player.getUniqueId()) < magic.EAT_TIME_MIN(); return startEat.containsKey(player.getUniqueId())
&& startEat.get(player.getUniqueId()) < checksConfig.getInteger(CheckType.FAST_EAT, "eatTimeMin");
} }
public void logHeal(Player player) { public void logHeal(Player player) {
@@ -376,16 +381,18 @@ public class Backend {
} }
Long l = user.getMessageTime(i); Long l = user.getMessageTime(i);
if (System.currentTimeMillis() - l > magic.CHAT_REPEAT_MIN()) { int repeatIgnore = checksConfig.getInteger(CheckType.CHAT_SPAM, "repeatIgnore");
if (System.currentTimeMillis() - l > repeatIgnore) {
user.clearMessages(); user.clearMessages();
break; break;
} else { } else {
int timeMin = checksConfig.getInteger(CheckType.CHAT_SPAM, "timeMin");
if (manager.getConfiguration().getConfig().blockChatSpamRepetition.getValue() if (manager.getConfiguration().getConfig().blockChatSpamRepetition.getValue()
&& m.equalsIgnoreCase(msg) && i == 1) { && m.equalsIgnoreCase(msg) && i == 1) {
manager.getLoggingManager().logFineInfo(player.getName() + " spam-repeated \"" + msg + "\""); manager.getLoggingManager().logFineInfo(player.getName() + " spam-repeated \"" + msg + "\"");
return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING()); return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING());
} else if (manager.getConfiguration().getConfig().blockChatSpamSpeed.getValue() } else if (manager.getConfiguration().getConfig().blockChatSpamSpeed.getValue()
&& System.currentTimeMillis() - user.getLastCommandTime() < magic.CHAT_MIN()) { && System.currentTimeMillis() - user.getLastCommandTime() < timeMin) {
manager.getLoggingManager().logFineInfo(player.getName() + " spammed quickly \"" + msg + "\""); manager.getLoggingManager().logFineInfo(player.getName() + " spammed quickly \"" + msg + "\"");
return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING()); return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING());
} }
@@ -424,15 +431,17 @@ public class Backend {
} }
Long l = user.getCommandTime(i); Long l = user.getCommandTime(i);
if (System.currentTimeMillis() - l > magic.COMMAND_REPEAT_MIN()) { int repeatIgnore = checksConfig.getInteger(CheckType.COMMAND_SPAM, "repeatIgnore");
if (System.currentTimeMillis() - l > repeatIgnore) {
user.clearCommands(); user.clearCommands();
break; break;
} else { } else {
int timeMin = checksConfig.getInteger(CheckType.COMMAND_SPAM, "timeMin");
if (manager.getConfiguration().getConfig().blockCommandSpamRepetition.getValue() if (manager.getConfiguration().getConfig().blockCommandSpamRepetition.getValue()
&& m.equalsIgnoreCase(cmd) && i == 1) { && m.equalsIgnoreCase(cmd) && i == 1) {
return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING()); return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING());
} else if (manager.getConfiguration().getConfig().blockCommandSpamSpeed.getValue() } else if (manager.getConfiguration().getConfig().blockCommandSpamSpeed.getValue()
&& System.currentTimeMillis() - user.getLastCommandTime() < magic.COMMAND_MIN()) { && System.currentTimeMillis() - user.getLastCommandTime() < timeMin) {
return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING()); return new CheckResult(CheckResult.Result.FAILED, lang.SPAM_WARNING());
} }
} }
@@ -452,30 +461,21 @@ public class Backend {
clicks = inventoryClicks.get(uuid) + 1; clicks = inventoryClicks.get(uuid) + 1;
} }
inventoryClicks.put(uuid, clicks); inventoryClicks.put(uuid, clicks);
int clicksToWait = checksConfig.getInteger(CheckType.FAST_INVENTORY, "clicksToWait");
if (clicks == 1) { if (clicks == 1) {
inventoryTime.put(uuid, System.currentTimeMillis()); inventoryTime.put(uuid, System.currentTimeMillis());
} else if (clicks == magic.INVENTORY_CHECK()) { } else if (clicks == clicksToWait) {
int minimumTime = checksConfig.getInteger(CheckType.FAST_INVENTORY, "clicksToWait");
long time = System.currentTimeMillis() - inventoryTime.get(uuid); long time = System.currentTimeMillis() - inventoryTime.get(uuid);
inventoryClicks.put(uuid, 0); inventoryClicks.put(uuid, 0);
if (time < magic.INVENTORY_TIMEMIN()) { if (time < minimumTime) {
return new CheckResult(CheckResult.Result.FAILED, "clicked inventory slots " + clicks + " times in " return new CheckResult(CheckResult.Result.FAILED, "clicked inventory slots " + clicks + " times in "
+ time + " ms (max=" + magic.INVENTORY_CHECK() + " in " + magic.INVENTORY_TIMEMIN() + " ms)"); + time + " ms (max=" + clicksToWait + " in " + minimumTime + " ms)");
} }
} }
return PASS; return PASS;
} }
public CheckResult checkAutoTool(Player player) {
if (itemInHand.containsKey(player.getUniqueId())
&& itemInHand.get(player.getUniqueId()) != VersionUtil.getItemInHand(player).getType()) {
return new CheckResult(CheckResult.Result.FAILED,
"switched tools too fast (had " + itemInHand.get(player.getUniqueId()) + ", has "
+ VersionUtil.getItemInHand(player).getType() + ")");
} else {
return PASS;
}
}
public CheckResult checkFastHeal(Player player) { public CheckResult checkFastHeal(Player player) {
User user = AntiCheatReloaded.getManager().getUserManager().getUser(player.getUniqueId()); User user = AntiCheatReloaded.getManager().getUserManager().getUser(player.getUniqueId());
if (lastHeal.containsKey(player.getUniqueId())) // Otherwise it was modified by a plugin, don't worry about it. if (lastHeal.containsKey(player.getUniqueId())) // Otherwise it was modified by a plugin, don't worry about it.
@@ -508,9 +508,10 @@ public class Backend {
} }
long l = startEat.get(player.getUniqueId()); long l = startEat.get(player.getUniqueId());
startEat.remove(player.getUniqueId()); startEat.remove(player.getUniqueId());
if ((System.currentTimeMillis() - l) < magic.EAT_TIME_MIN()) { int eatTimeMin = checksConfig.getInteger(CheckType.FAST_EAT, "eatTimeMin");
if ((System.currentTimeMillis() - l) < eatTimeMin) {
return new CheckResult(CheckResult.Result.FAILED, "ate too quickly (time=" return new CheckResult(CheckResult.Result.FAILED, "ate too quickly (time="
+ (System.currentTimeMillis() - l) + " ms, min=" + magic.EAT_TIME_MIN() + " ms)"); + (System.currentTimeMillis() - l) + " ms, min=" + eatTimeMin + " ms)");
} }
} }
return PASS; return PASS;
@@ -525,7 +526,8 @@ public class Backend {
} }
public boolean justBroke(Player player) { public boolean justBroke(Player player) {
return isDoing(player, brokenBlock, magic.BLOCK_BREAK_MIN()); // TODO config??
return isDoing(player, brokenBlock, 0.1);
} }
public void logVelocity(final Player player) { public void logVelocity(final Player player) {
@@ -538,13 +540,13 @@ public class Backend {
public boolean justVelocity(Player player) { public boolean justVelocity(Player player) {
return (velocitized.containsKey(player.getUniqueId()) return (velocitized.containsKey(player.getUniqueId())
? (System.currentTimeMillis() - velocitized.get(player.getUniqueId())) < magic.VELOCITY_CHECKTIME() ? (System.currentTimeMillis() - velocitized.get(player.getUniqueId())) < magic.VELOCITY_TIME()
: false); : false);
} }
public boolean justLevitated(Player player) { public boolean justLevitated(Player player) {
return (levitatingEnd.containsKey(player.getUniqueId()) return (levitatingEnd.containsKey(player.getUniqueId())
? (System.currentTimeMillis() - levitatingEnd.get(player.getUniqueId())) < magic.VELOCITY_CHECKTIME() ? (System.currentTimeMillis() - levitatingEnd.get(player.getUniqueId())) < magic.VELOCITY_TIME()
: false); : false);
} }
@@ -559,7 +561,7 @@ public class Backend {
public void run() { public void run() {
velocitytrack.put(player.getUniqueId(), 0); velocitytrack.put(player.getUniqueId(), 0);
} }
}, magic.VELOCITY_SCHETIME() * 20L); }, magic.VELOCITY_EXTENSION() * 20L);
return true; return true;
} }
} else { } else {
@@ -574,7 +576,8 @@ public class Backend {
} }
public boolean justPlaced(Player player) { public boolean justPlaced(Player player) {
return isDoing(player, placedBlock, magic.BLOCK_PLACE_MIN()); // TODO config??
return isDoing(player, placedBlock, 0.1);
} }
public void logDamage(final Player player, int type) { public void logDamage(final Player player, int type) {
@@ -615,7 +618,7 @@ public class Backend {
} }
public void logBoatCollision(final Player player) { public void logBoatCollision(final Player player) {
// TODO config // TODO config??
FlightCheck.MOVING_EXEMPT.put(player.getUniqueId(), System.currentTimeMillis() + 100 /* 2 ticks */); FlightCheck.MOVING_EXEMPT.put(player.getUniqueId(), System.currentTimeMillis() + 100 /* 2 ticks */);
} }
@@ -666,9 +669,10 @@ public class Backend {
public void processChatSpammer(Player player) { public void processChatSpammer(Player player) {
User user = manager.getUserManager().getUser(player.getUniqueId()); User user = manager.getUserManager().getUser(player.getUniqueId());
int level = chatLevel.containsKey(user.getUUID()) ? chatLevel.get(user.getUUID()) : 0; int level = chatLevel.containsKey(user.getUUID()) ? chatLevel.get(user.getUUID()) : 0;
if (player != null && player.isOnline() && level >= magic.CHAT_ACTION_ONE_LEVEL()) { int levelActionOne = checksConfig.getInteger(CheckType.CHAT_SPAM, "levelActionOne");
String event = level >= magic.CHAT_ACTION_TWO_LEVEL() int levelActionTwo = checksConfig.getInteger(CheckType.CHAT_SPAM, "levelActionTwo");
? manager.getConfiguration().getConfig().chatSpamActionTwo.getValue() if (player != null && player.isOnline() && level >= levelActionOne) {
String event = level >= levelActionTwo ? manager.getConfiguration().getConfig().chatSpamActionTwo.getValue()
: manager.getConfiguration().getConfig().chatSpamActionOne.getValue(); : manager.getConfiguration().getConfig().chatSpamActionOne.getValue();
manager.getUserManager().execute(manager.getUserManager().getUser(player.getUniqueId()), manager.getUserManager().execute(manager.getUserManager().getUser(player.getUniqueId()),
Utilities.stringToList(event), CheckType.CHAT_SPAM, lang.SPAM_KICK_REASON(), Utilities.stringToList(event), CheckType.CHAT_SPAM, lang.SPAM_KICK_REASON(),
@@ -680,8 +684,10 @@ public class Backend {
public void processCommandSpammer(Player player) { public void processCommandSpammer(Player player) {
User user = manager.getUserManager().getUser(player.getUniqueId()); User user = manager.getUserManager().getUser(player.getUniqueId());
int level = commandLevel.containsKey(user.getUUID()) ? commandLevel.get(user.getUUID()) : 0; int level = commandLevel.containsKey(user.getUUID()) ? commandLevel.get(user.getUUID()) : 0;
if (player != null && player.isOnline() && level >= magic.COMMAND_ACTION_ONE_LEVEL()) { int levelActionOne = checksConfig.getInteger(CheckType.COMMAND_SPAM, "levelActionOne");
String event = level >= magic.COMMAND_ACTION_TWO_LEVEL() int levelActionTwo = checksConfig.getInteger(CheckType.COMMAND_SPAM, "levelActionTwo");
if (player != null && player.isOnline() && level >= levelActionOne) {
String event = level >= levelActionTwo
? manager.getConfiguration().getConfig().commandSpamActionTwo.getValue() ? manager.getConfiguration().getConfig().commandSpamActionTwo.getValue()
: manager.getConfiguration().getConfig().commandSpamActionOne.getValue(); : manager.getConfiguration().getConfig().commandSpamActionOne.getValue();
manager.getUserManager().execute(manager.getUserManager().getUser(player.getUniqueId()), manager.getUserManager().execute(manager.getUserManager().getUser(player.getUniqueId()),
@@ -55,7 +55,6 @@ public enum CheckType {
FAST_PROJECTILE(Permission.CHECK_FASTPROJECTILE, "FastProjectile"), FAST_PROJECTILE(Permission.CHECK_FASTPROJECTILE, "FastProjectile"),
ITEM_SPAM(Permission.CHECK_ITEMSPAM, "ItemSpam"), ITEM_SPAM(Permission.CHECK_ITEMSPAM, "ItemSpam"),
FAST_INVENTORY(Permission.CHECK_FASTINVENTORY, "FastInventory"), FAST_INVENTORY(Permission.CHECK_FASTINVENTORY, "FastInventory"),
AUTOTOOL(Permission.CHECK_AUTOTOOL, "AutoTool"),
MOREPACKETS(Permission.CHECK_MOREPACKETS, "MorePackets"), MOREPACKETS(Permission.CHECK_MOREPACKETS, "MorePackets"),
BADPACKETS(Permission.CHECK_BADPACKETS, "BadPackets"), BADPACKETS(Permission.CHECK_BADPACKETS, "BadPackets"),
VELOCITY(Permission.CHECK_VELOCITY, "Velocity"), VELOCITY(Permission.CHECK_VELOCITY, "Velocity"),
@@ -39,7 +39,6 @@ import com.rammelkast.anticheatreloaded.util.VersionUtil;
/** /**
* @author Rammelkast * @author Rammelkast
* TODO fix cobweb false positives
*/ */
public class FlightCheck { public class FlightCheck {
@@ -228,7 +228,7 @@ public class SpeedCheck {
return PASS; return PASS;
if (player.isInsideVehicle() || player.isSleeping() if (player.isInsideVehicle() || player.isSleeping()
|| backend.isDoing(player, backend.velocitized, backend.getMagic().VELOCITY_SCHETIME()) || VersionUtil.isFlying(player) || backend.isDoing(player, backend.velocitized, backend.getMagic().VELOCITY_EXTENSION()) || VersionUtil.isFlying(player)
|| VersionUtil.isRiptiding(player)) { || VersionUtil.isRiptiding(player)) {
return PASS; return PASS;
} }
@@ -22,6 +22,7 @@ import java.util.UUID;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import com.rammelkast.anticheatreloaded.AntiCheatReloaded; import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
import com.rammelkast.anticheatreloaded.check.CheckResult; import com.rammelkast.anticheatreloaded.check.CheckResult;
@@ -60,14 +61,17 @@ public class WaterWalkCheck {
return new CheckResult(Result.FAILED, return new CheckResult(Result.FAILED,
"tried to hop on water (mY=" + Utilities.roundDouble(movementManager.motionY, 5) + ")"); "tried to hop on water (mY=" + Utilities.roundDouble(movementManager.motionY, 5) + ")");
// TODO fix speed effect falses double minAbsMotionY = 0.08D;
if (player.hasPotionEffect(PotionEffectType.SPEED))
minAbsMotionY += (player.getPotionEffect(PotionEffectType.SPEED).getAmplifier() + 1) * 0.05D;
if (checksConfig.isSubcheckEnabled(CheckType.WATER_WALK, "lunge") && blockBeneath.isLiquid() if (checksConfig.isSubcheckEnabled(CheckType.WATER_WALK, "lunge") && blockBeneath.isLiquid()
&& Utilities.isSurroundedByWater(player) && Utilities.isSurroundedByWater(player)
&& Math.abs(movementManager.lastMotionY - movementManager.motionY) > 0.08 && Math.abs(movementManager.lastMotionY - movementManager.motionY) > minAbsMotionY
&& movementManager.distanceXZ > checksConfig.getDouble(CheckType.WATER_WALK, "lunge", "minimumDistXZ") && movementManager.distanceXZ > checksConfig.getDouble(CheckType.WATER_WALK, "lunge", "minimumDistXZ")
&& movementManager.lastMotionY > -0.25) && movementManager.lastMotionY > -0.25)
return new CheckResult(Result.FAILED, return new CheckResult(Result.FAILED, "tried to lunge in water (xz="
"tried to lunge in water (xz=" + Utilities.roundDouble(movementManager.distanceXZ, 5) + ")"); + Utilities.roundDouble(movementManager.distanceXZ, 5) + ", absMotionY="
+ Utilities.roundDouble(Math.abs(movementManager.lastMotionY - movementManager.motionY), 5) + ")");
return PASS; return PASS;
} }
@@ -32,7 +32,6 @@ import com.rammelkast.anticheatreloaded.check.CheckResult;
import com.rammelkast.anticheatreloaded.check.CheckType; import com.rammelkast.anticheatreloaded.check.CheckType;
import com.rammelkast.anticheatreloaded.check.combat.KillAuraCheck; import com.rammelkast.anticheatreloaded.check.combat.KillAuraCheck;
import com.rammelkast.anticheatreloaded.config.providers.Checks; import com.rammelkast.anticheatreloaded.config.providers.Checks;
import com.rammelkast.anticheatreloaded.config.providers.Magic;
import com.rammelkast.anticheatreloaded.util.User; import com.rammelkast.anticheatreloaded.util.User;
import com.rammelkast.anticheatreloaded.util.Utilities; import com.rammelkast.anticheatreloaded.util.Utilities;
import com.rammelkast.anticheatreloaded.util.VersionUtil; import com.rammelkast.anticheatreloaded.util.VersionUtil;
@@ -88,11 +87,10 @@ public class IllegalInteract {
} }
private static boolean isValidTarget(Player player, Block block) { private static boolean isValidTarget(Player player, Block block) {
Magic magic = AntiCheatReloaded.getManager().getConfiguration().getMagic();
Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks(); Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks();
double distance = player.getGameMode() == GameMode.CREATIVE ? magic.BLOCK_MAX_DISTANCE_CREATIVE() double distance = player.getGameMode() == GameMode.CREATIVE ? 6.0
: player.getLocation().getDirection().getY() > 0.9 ? magic.BLOCK_MAX_DISTANCE_CREATIVE() : player.getLocation().getDirection().getY() > 0.9 ? 6.0
: magic.BLOCK_MAX_DISTANCE(); : 5.5;
Block targetBlock = VersionUtil.getTargetBlock(player, ((int) Math.ceil(distance))); Block targetBlock = VersionUtil.getTargetBlock(player, ((int) Math.ceil(distance)));
if (targetBlock == null) { if (targetBlock == null) {
// TODO better check here // TODO better check here
@@ -66,122 +66,22 @@ public interface Magic {
* Time to exempt a player from moving because of taking damage from an explosion; Type=SYSTEM, Leniency=INCREASE. * Time to exempt a player from moving because of taking damage from an explosion; Type=SYSTEM, Leniency=INCREASE.
*/ */
public int EXPLOSION_DAMAGE_TIME(); public int EXPLOSION_DAMAGE_TIME();
/**
* Minimum time it takes to fire X projectiles; Type=SYSTEM, Leniency=DECREASE.
*/
public int PROJECTILE_TIME_MIN();
/**
* Number of projectiles to wait for before checking how long they took to fire off; Type=INTEGER.
*/
public int PROJECTILE_CHECK();
/**
* Minimum time it takes to drop X items; Type=SYSTEM, Leniency=DECREASE.
*/
public int DROP_TIME_MIN();
/**
* Number of item drops to wait for before checking how long they took to drop; Type=INTEGER.
*/
public int DROP_CHECK();
/**
* Number of times required to punch a block before it breaks; Type=INTEGER, Leniency=DECREASE.
*/
public int BLOCK_PUNCH_MIN();
/**
* Number of command spam violations before action one is executed; Type=INTEGER, Leniency=INCREASE.
*/
public int COMMAND_ACTION_ONE_LEVEL();
/**
* Number of command spam violations before action two is executed; Type=INTEGER, Leniency=INCREASE.
*/
public int COMMAND_ACTION_TWO_LEVEL();
/**
* Number of chat spam violations before action one is executed; Type=INTEGER, Leniency=INCREASE.
*/
public int CHAT_ACTION_ONE_LEVEL();
/**
* Number of chat spam violations before action two is executed; Type=INTEGER, Leniency=INCREASE.
*/
public int CHAT_ACTION_TWO_LEVEL();
/** /**
* Time used to schedule increasing a players velocity count - probably not touching this would be good; Type=INTEGER. * Time used to schedule increasing a players velocity count - probably not touching this would be good; Type=INTEGER.
*/ */
public int VELOCITY_SCHETIME(); public int VELOCITY_EXTENSION();
/** /**
* Maximum time a player is considered to have a change in velocity; Type=SYSTEM, Leniency=INCREASE. * Time a player is considered to have a change in velocity; Type=SYSTEM, Leniency=INCREASE.
*/ */
public int VELOCITY_CHECKTIME(); public int VELOCITY_TIME();
/** /**
* Time to extend a player's velocity count by; Type=SYSTEM, Leniency=INCREASE. * Time to extend a player's velocity count by; Type=SYSTEM, Leniency=INCREASE.
*/ */
public int VELOCITY_PREVENT(); public int VELOCITY_PREVENT();
/** /**
* Number of times a player can fail the velocity check before action is taken; Type=INTEGER, Leniency=INCREASE. * Maximum amount of velocity tracks; Type=INTEGER, Leniency=INCREASE.
*/ */
public int VELOCITY_MAXTIMES(); public int VELOCITY_MAXTIMES();
/**
* Number of times a player can sprint without proper food level before action is taken; Type=INTEGER, Leniency=INCREASE.
*/
public int SPRINT_FOOD_MIN();
/**
* Maximum times a player can interact between animations; Type=INTEGER, Leniency=INCREASE.
*/
public int ANIMATION_INTERACT_MAX();
/**
* Minimum time between commands; Type=SYSTEM, Leniency=DECREASE.
*/
public int COMMAND_MIN();
/**
* Minimum time before repeating a command is ignored; Type=SYSTEM, Leniency=DECREASE.
*/
public int COMMAND_REPEAT_MIN();
/**
* Minimum time between chats; Type=SYSTEM, Leniency=DECREASE.
*/
public int CHAT_MIN();
/**
* Time before repeating yourself in chat is ignored; Type=SYSTEM, Leniency=INCREASE.
*/
public int CHAT_REPEAT_MIN();
/**
* Minimum time in between block breaks; Type=INTEGER, Leniency=DECREASE.
*/
public double BLOCK_BREAK_MIN();
/**
* Minimum time in between block placing; Type=INTEGER, Leniency=DECREASE.
*/
public double BLOCK_PLACE_MIN();
/**
* Minimum time in between eating; Type=SYSTEM, Leniency=DECREASE.
*/
public int EAT_TIME_MIN();
/**
* Maximum percent error between predicted bow force and actual bow force; Type=DOUBLE, Leniency=INCREASE.
*/
public double BOW_ERROR();
/**
* Maximum distance a player can break a block from; Type=DOUBLE, Leniency=INCREASE.
*/
public double BLOCK_MAX_DISTANCE();
/**
* Minimum distance a player can break a block from in creative mode; Type=DOUBLE, Leniency=INCREASE.
*/
public double BLOCK_MAX_DISTANCE_CREATIVE();
/**
* Maximum speed a player on a ladder can travel; Type=DOUBLE, Leniency=INCREASE.
*/
public double LADDER_Y_MAX();
/**
* Minimum speed a player on a ladder can travel; Type=DOUBLE, Leniency=DECREASE.
*/
public double LADDER_Y_MIN();
/**
* The number of clicks we should wait before checking if the player has used fast inventory; Type=INTEGER; Leniency=INCREASE.
*/
public int INVENTORY_CHECK();
/**
* The minimum time it should have taken for the player to click X times; Type=INTEGER; Leniency=INCREASE.
*/
public int INVENTORY_TIMEMIN();
/** /**
* Minimum travel distance for move to be considered a teleport and subsequently be ignored; Type=INTEGER, Leniency=INCREASE. * Minimum travel distance for move to be considered a teleport and subsequently be ignored; Type=INTEGER, Leniency=INCREASE.
*/ */
@@ -20,9 +20,7 @@ package com.rammelkast.anticheatreloaded.event;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import com.rammelkast.anticheatreloaded.AntiCheatReloaded; import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
@@ -32,20 +30,6 @@ import com.rammelkast.anticheatreloaded.check.player.IllegalInteract;
public class BlockListener extends EventListener { public class BlockListener extends EventListener {
@EventHandler(priority = EventPriority.MONITOR)
public void onBlockDamage(BlockDamageEvent event) {
Player player = event.getPlayer();
if (getCheckManager().willCheck(player, CheckType.AUTOTOOL)) {
CheckResult result = getBackend().checkAutoTool(player);
if (result.failed()) {
event.setCancelled(!silentMode());
log(result.getMessage(), player, CheckType.AUTOTOOL);
}
}
AntiCheatReloaded.getManager().addEvent(event.getEventName(), event.getHandlers().getRegisteredListeners());
}
@EventHandler(ignoreCancelled = true) @EventHandler(ignoreCancelled = true)
public void onBlockPlace(BlockPlaceEvent event) { public void onBlockPlace(BlockPlaceEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
@@ -137,14 +137,6 @@ public class EntityListener extends EventListener {
if (e.getDamager() instanceof Player) { if (e.getDamager() instanceof Player) {
Player player = (Player) e.getDamager(); Player player = (Player) e.getDamager();
getBackend().logDamage(player, 1); getBackend().logDamage(player, 1);
if (getCheckManager().willCheck(player, CheckType.AUTOTOOL)) {
CheckResult result = getBackend().checkAutoTool(player);
if (result.failed()) {
event.setCancelled(!silentMode());
log(result.getMessage(), player, CheckType.AUTOTOOL);
noHack = false;
}
}
if (getCheckManager().willCheck(player, CheckType.KILLAURA)) { if (getCheckManager().willCheck(player, CheckType.KILLAURA)) {
CheckResult result = KillAuraCheck.checkAngle(player, event); CheckResult result = KillAuraCheck.checkAngle(player, event);
if (result.failed()) { if (result.failed()) {
@@ -25,7 +25,7 @@ public enum Permission {
/* Check Nodes */ /* Check Nodes */
CHECK_FLIGHT, CHECK_ELYTRAFLY, CHECK_WATERWALK, CHECK_FASTPLACE, CHECK_CHATSPAM, CHECK_COMMANDSPAM, CHECK_SPRINT, CHECK_FLIGHT, CHECK_ELYTRAFLY, CHECK_WATERWALK, CHECK_FASTPLACE, CHECK_CHATSPAM, CHECK_COMMANDSPAM, CHECK_SPRINT,
CHECK_SNEAK, CHECK_SPEED, CHECK_VCLIP, CHECK_SPIDER, CHECK_NOFALL, CHECK_FASTBOW, CHECK_FASTEAT, CHECK_FASTHEAL, CHECK_SNEAK, CHECK_SPEED, CHECK_VCLIP, CHECK_SPIDER, CHECK_NOFALL, CHECK_FASTBOW, CHECK_FASTEAT, CHECK_FASTHEAL,
CHECK_KILLAURA, CHECK_UNICODE, CHECK_FASTPROJECTILE, CHECK_ITEMSPAM, CHECK_FASTINVENTORY, CHECK_AUTOTOOL, CHECK_KILLAURA, CHECK_UNICODE, CHECK_FASTPROJECTILE, CHECK_ITEMSPAM, CHECK_FASTINVENTORY,
CHECK_MOREPACKETS, CHECK_BADPACKETS, CHECK_VELOCITY, CHECK_CRITICALS, CHECK_ILLEGALINTERACT, CHECK_FASTLADDER, CHECK_MOREPACKETS, CHECK_BADPACKETS, CHECK_VELOCITY, CHECK_CRITICALS, CHECK_ILLEGALINTERACT, CHECK_FASTLADDER,
CHECK_AIMBOT, CHECK_AIMBOT,
@@ -19,8 +19,14 @@
package com.rammelkast.anticheatreloaded.util; package com.rammelkast.anticheatreloaded.util;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@@ -30,11 +36,6 @@ import com.rammelkast.anticheatreloaded.check.CheckType;
import com.rammelkast.anticheatreloaded.config.Configuration; import com.rammelkast.anticheatreloaded.config.Configuration;
import com.rammelkast.anticheatreloaded.util.rule.Rule; import com.rammelkast.anticheatreloaded.util.rule.Rule;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class User { public class User {
private final UUID uuid; private final UUID uuid;
private final String name; private final String name;
@@ -48,14 +49,14 @@ public class User {
private Long[] messageTimes = new Long[2]; private Long[] messageTimes = new Long[2];
private String[] commands = new String[2]; private String[] commands = new String[2];
private Long[] commandTimes = new Long[2]; private Long[] commandTimes = new Long[2];
private boolean isWaitingOnLevelSync; private boolean isWaitingOnLevelSync;
private Timestamp levelSyncTimestamp; private Timestamp levelSyncTimestamp;
private long lastServerPing, lastClientPong; private long lastServerPing, lastClientPong;
private int ping = -1; private int ping = -1;
private int lastPing = -1; private int lastPing = -1;
private MovementManager movementManager; private MovementManager movementManager;
/** /**
@@ -238,7 +239,7 @@ public class User {
public boolean setGoodLocation(Location location) { public boolean setGoodLocation(Location location) {
if (Utilities.cantStandAtExp(location) if (Utilities.cantStandAtExp(location)
|| (location.getBlock().isLiquid() && !Utilities.isFullyInWater(location)) || (location.getBlock().isLiquid() && !Utilities.isFullyInWater(location))
|| !location.getBlock().getType().isSolid()) { || (!location.getBlock().getType().isSolid() && location.getBlock().getType() != Material.AIR)) {
return false; return false;
} }
@@ -461,7 +462,7 @@ public class User {
public boolean isLagging() { public boolean isLagging() {
return Math.abs(this.ping - this.lastPing) > config.getMagic().LAG_DETERMINATION(); return Math.abs(this.ping - this.lastPing) > config.getMagic().LAG_DETERMINATION();
} }
public MovementManager getMovementManager() { public MovementManager getMovementManager() {
return this.movementManager; return this.movementManager;
} }
+60 -9
View File
@@ -1,5 +1,6 @@
# AntiCheatReloaded checks configuration file # AntiCheatReloaded checks configuration file
# Flight check settings # Flight check settings
# Checks if a player moves wrongly in the air
flight: flight:
# Checks for prolonged air movement # Checks for prolonged air movement
# Debugs as 'tried to fly on the Y-axis' or 'had too little Y dropoff' # Debugs as 'tried to fly on the Y-axis' or 'had too little Y dropoff'
@@ -48,6 +49,7 @@ elytrafly:
enabled: true enabled: true
# Speed check settings # Speed check settings
# Checks if a player moves too fast
speed: speed:
# Checks movement speed in the air # Checks movement speed in the air
# Debugs as 'moved too fast in air' # Debugs as 'moved too fast in air'
@@ -135,6 +137,7 @@ fastladder:
vlBeforeFlag: 3 vlBeforeFlag: 3
# KillAura check settings # KillAura check settings
# Checks if the player uses a form of kill aura
killaura: killaura:
# Checks reach distance in fights # Checks reach distance in fights
# Debugs as 'reached too far' # Debugs as 'reached too far'
@@ -167,6 +170,7 @@ killaura:
vlBeforeFlag: 3 vlBeforeFlag: 3
# Aimbot check settings # Aimbot check settings
# Checks if the player is sending aimbot-like movements
aimbot: aimbot:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -176,6 +180,7 @@ aimbot:
maxYaw: 355 maxYaw: 355
# Criticals check settings # Criticals check settings
# Checks if the player tries to do a crit without needed conditions
criticals: criticals:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -191,6 +196,7 @@ velocity:
vlBeforeFlag: 2 vlBeforeFlag: 2
# FastPlace check settings # FastPlace check settings
# Checks if the player places blocks too fast
fastplace: fastplace:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -204,6 +210,7 @@ fastplace:
blockPlacementTime: 1000 blockPlacementTime: 1000
# IllegalInteract check settings # IllegalInteract check settings
# Checks if the player is using, placing or breaking blocks from illegal angles
illegalinteract: illegalinteract:
# Maximum difference in angle from the players view # Maximum difference in angle from the players view
maxAngleDifference: 90 maxAngleDifference: 90
@@ -223,15 +230,16 @@ illegalinteract:
# Should this part of the check be enabled? # Should this part of the check be enabled?
enabled: true enabled: true
# Default survival interact range # Default survival interact range
survivalRange: 5.5 survivalRange: 5.8
# Default creative interact range # Default creative interact range
creativeRange: 6.5 creativeRange: 6.8
# Extra allowed reach distance per millisecond of ping # Extra allowed reach distance per millisecond of ping
pingCompensation: 0.0045 pingCompensation: 0.0045
# The multiplier of extra compensation for velocity # The multiplier of extra compensation for velocity
velocityMultiplier: 1.5 velocityMultiplier: 1.5
# BadPackets check settings # BadPackets check settings
# Checks for illegal packets
badpackets: badpackets:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -241,6 +249,7 @@ badpackets:
maxDistance: 25.0 maxDistance: 25.0
# MorePackets check settings # MorePackets check settings
# Checks for an extra amount of packets and modified game timers
morepackets: morepackets:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -260,7 +269,7 @@ morepackets:
maxPing: -1 maxPing: -1
# Sneak check settings # Sneak check settings
# Checks if a player toggles sneak too fast # Checks if the player toggles sneak too fast
sneak: sneak:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -273,11 +282,13 @@ sneak:
minToggleTime: 75 minToggleTime: 75
# Spider check settings # Spider check settings
# Checks if the player tries to climb a non-climbable block
spider: spider:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# NoFall check settings # NoFall check settings
# Checks if the player tries to ignore fall damage
nofall: nofall:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -285,21 +296,31 @@ nofall:
vlBeforeFlag: 6 vlBeforeFlag: 6
# Sprint check settings # Sprint check settings
# Checks if the player tries to sprint without the needed conditions
sprint: sprint:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# Minimum food level needed to sprint
sprintFoodMin: 6
# FastBow check settings # FastBow check settings
# Checks if the player fires a bow too fast
fastbow: fastbow:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# Maximum percent error between predicted bow force and actual bow force
bowError: 0.25
# FastEat check settings # FastEat check settings
# Checks if the player consumes food too fast
fasteat: fasteat:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# Minimum time in milliseconds it takes to consume food
eatTimeMin: 1000
# FastHeal check settings # FastHeal check settings
# Checks if the player regains health too fast
fastheal: fastheal:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
@@ -314,41 +335,71 @@ fastheal:
pingCompensation: 0.15 pingCompensation: 0.15
# FastProjectile check settings # FastProjectile check settings
# Checks if the player fires a projectile too fast
fastprojectile: fastprojectile:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# Number of projectiles to wait for before checking how long they took to fire off
projectilesToWait: 10
# The minimum time in milliseconds it should have taken for the player fire 'projectilesToWait' projectiles
minimumTime: 1500
# ItemSpam check settings # ItemSpam check settings
# Checks if the player drops items too fast
itemspam: itemspam:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# The number of item drops we should wait before checking if the player has used item spam
dropsToWait: 10
# The minimum time in milliseconds it should have taken for the player to drop items 'dropsToWait' times
minimumTime: 800
# FastInventory check settings # FastInventory check settings
# Checks if the player moves items in the inventory too fast
fastinventory: fastinventory:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# The number of clicks we should wait before checking if the player has used fast inventory
# AutoTool check settings clicksToWait: 10
autotool: # The minimum time in milliseconds it should have taken for the player to click 'clicksToWait' times
# Should this check be enabled? minimumTime: 50
enabled: true
# vClip check settings # vClip check settings
# Checks if the player is clipping
vclip: vclip:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# ChatUnicode check settings # ChatUnicode check settings
# Checks for illegal unicode characters in the chat
chatunicode: chatunicode:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# ChatSpam check settings # ChatSpam check settings
# Checks for a spam of chat messages
chatspam: chatspam:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# Minimum time between chats
timeMin: 500
# Time in milliseconds after which repeating yourself in chat is ignored
repeatIgnore: 600
# Number of chat spam violations before action one (see config.yml) is executed
levelActionOne: 5
# Number of chat spam violations before action two (see config.yml) is executed
levelActionTwo: 10
# CommandSpam check settings # CommandSpam check settings
# Checks for a spam of commands
commandspam: commandspam:
# Should this check be enabled? # Should this check be enabled?
enabled: true enabled: true
# Minimum time between commands
timeMin: 400
# Time in milliseconds after which repeating a command is ignored
repeatIgnore: 500
# Number of command spam violations before action one (see config.yml) is executed
levelActionOne: 5
# Number of command spam violations before action two (see config.yml) is executed
levelActionTwo: 10
+2 -2
View File
@@ -35,9 +35,9 @@ system:
# Do NOT enable this in a production environment! # Do NOT enable this in a production environment!
debug-mode: false debug-mode: false
# To prevent spamming, staff and the console will only be notified every x violations # To prevent spamming, staff and the console will only be notified every x violations
# Minimum value is 1, default is 5 # Minimum value is 1, default is 10
# Example with 5: notifications after 5 vl, 10vl, 15vl, etc. # Example with 5: notifications after 5 vl, 10vl, 15vl, etc.
notify-every-vl: 5 notify-every-vl: 10
# Use /AntiCheatReloaded checks for a list of valid checks # Use /AntiCheatReloaded checks for a list of valid checks
disable-in: disable-in:
- example-world - example-world
+15 -93
View File
@@ -1,114 +1,36 @@
# Number of times required to punch a block before it breaks
# Changing this value is almost never required
BLOCK_PUNCH_MIN: 5
# Time to exempt a player from moving because of taking damage
# Can be decreased very slightly to increase detection
# Increasing in case of false positives is almost never necessary and is not advised
DAMAGE_TIME: 3000
# Number of item drops to wait for before checking how long they took to drop
# Changing this value is almost never required
DROP_CHECK: 10
# Minimum time it takes to drop X items
# Changing this value is almost never required
DROP_TIME_MIN: 800
# Time to exempt a player from moving because of entering/exiting a vehicle # Time to exempt a player from moving because of entering/exiting a vehicle
# Increase in case of false positives # Increase in case of false positives
ENTERED_EXITED_TIME: 1000 ENTERED_EXITED_TIME: 1000
# Time to exempt a player from moving because of teleporting
# Increase in case of false positives
TELEPORT_TIME: 1000
# Time to exempt a player from moving because of exiting fly mode # Time to exempt a player from moving because of exiting fly mode
# Changing this value is almost never required # Changing this value is almost never required
EXIT_FLY_TIME: 2000 EXIT_FLY_TIME: 2000
# Time to exempt a player from moving because of taking damage from an explosion
# Can be decreased very slightly to increase detection
# Increasing in case of false positives is almost never necessary and is not advised
EXPLOSION_DAMAGE_TIME: 5000
# Time to exempt a player from moving because of joining the server # Time to exempt a player from moving because of joining the server
# If your server is slow when a player joins, increasing this value is important # If your server is slow when a player joins, increasing this value is important
# Shouldn't be lower than 1500 or higher than 5000 # Shouldn't be lower than 1500 or higher than 5000
JOIN_TIME: 2000 JOIN_TIME: 2000
# Time to exempt a player from moving because of taking damage
# Can be decreased very slightly to increase detection
# Increasing in case of false positives is almost never necessary and is not advised
DAMAGE_TIME: 3000
# Time to exempt a player from moving because of taking damage with knockback effects # Time to exempt a player from moving because of taking damage with knockback effects
# Can be decreased very slightly to increase detection # Can be decreased very slightly to increase detection
# Increase in case of false positives, but shouldn't be necessary # Increase in case of false positives, but shouldn't be necessary
KNOCKBACK_DAMAGE_TIME: 4000 KNOCKBACK_DAMAGE_TIME: 4000
# Number of projectiles to wait for before checking how long they took to fire off # Time to exempt a player from moving because of taking damage from an explosion
# Do not decrease this value # Can be decreased very slightly to increase detection
PROJECTILE_CHECK: 10 # Increasing in case of false positives is almost never necessary and is not advised
# Minimum time it takes to fire X projectiles EXPLOSION_DAMAGE_TIME: 5000
# Decrease in case of false positives # Amount of seconds to extend a players velocitized state after receiving velocity again
PROJECTILE_TIME_MIN: 1500 VELOCITY_EXTENSION: 2
# Time to exempt a player from moving because of teleporting # Time a player is considered to have a change in velocity
# Increase in case of false positives VELOCITY_TIME: 2000
TELEPORT_TIME: 1000
# Number of command spam violations before action one is executed
# Should be changed to personal preference
COMMAND_ACTION_ONE_LEVEL: 5
# Number of command spam violations before action two is executed
# Should be changed to personal preference
COMMAND_ACTION_TWO_LEVEL: 10
# Number of chat spam violations before action one is executed
# Should be changed to personal preference
CHAT_ACTION_ONE_LEVEL: 5
# Number of chat spam violations before action two is executed
# Should be changed to personal preference
CHAT_ACTION_TWO_LEVEL: 10
# This is a set value and shouldn't be changed unless you know what you're doing
VELOCITY_SCHETIME: 2
# Maximum time a player is considered to have a change in velocity
# This is a set value and shouldn't be changed unless you know what you're doing
VELOCITY_CHECKTIME: 2100
# This is a set value and shouldn't be changed unless you know what you're doing # This is a set value and shouldn't be changed unless you know what you're doing
VELOCITY_PREVENT: 5000 VELOCITY_PREVENT: 5000
# This is a set value and shouldn't be changed unless you know what you're doing # This is a set value and shouldn't be changed unless you know what you're doing
VELOCITY_MAXTIMES: 2 VELOCITY_MAXTIMES: 2
# This is a set value and shouldn't be changed unless you know what you're doing
VELOCITY_TIME: 3
# Number of times a player can sprint without proper food level before being considered a cheater
# Can either be increased or decreased to your liking. Shouldn't make a massive difference.
SPRINT_FOOD_MIN: 6
# Maximum times a player can interact between animations
# Changing this value of almost never required
ANIMATION_INTERACT_MAX: 3
# Minimum time between commands in milliseconds
# Should be changed to personal preference
COMMAND_MIN: 400
# Time before repeating a command in milliseconds
# Should be changed to personal preference
COMMAND_REPEAT_MIN: 500
# Minimum time between chats in milliseconds
# Should be changed to personal preference
CHAT_MIN: 500
# Time before repeating yourself in chat is ignored in milliseconds
# Should be changed to personal preference
CHAT_REPEAT_MIN: 600
# Minimum time in between block breaks
# Decrease in case of false positives
BLOCK_BREAK_MIN: 0.1
# Minimum time in between block placing
# Decrease in case of false positives
BLOCK_PLACE_MIN: 0.1
# Minimum time in between eating
# Decrease in case of false positives
EAT_TIME_MIN: 1000
# Maximum percent error between predicted bow force and actual bow force
# Increase in case of false positives
BOW_ERROR: 0.25
# Maximum distance a player can break a block from
# Changing this value is almost never required
BLOCK_MAX_DISTANCE: 5.5
# Maximum distance a player can break a block from when in creative mode
# Changing this value is almost never required
BLOCK_MAX_DISTANCE_CREATIVE: 6.0
# Maximum speed a player on a ladder can travel
# This is a set value and shouldn't be changed unless you know what you're doing
LADDER_Y_MAX: 0.11761
# Minimum speed a player on a ladder can travel
# This is a set value and shouldn't be changed unless you know what you're doing
LADDER_Y_MIN: 0.11759
# The number of clicks we should wait before checking if the player has used fast inventory
# Increase in case of false positives
INVENTORY_CHECK: 10
# The minimum time it should have taken for the player to click X times
# Increase in case of false positives
INVENTORY_TIMEMIN: 50
# Minimum travel distance for move to be considered a teleport and subsequently be ignored # Minimum travel distance for move to be considered a teleport and subsequently be ignored
# This is a set value and shouldn't be changed unless you know what you're doing # This is a set value and shouldn't be changed unless you know what you're doing
TELEPORT_MIN: 400 TELEPORT_MIN: 400
+1 -13
View File
@@ -55,12 +55,6 @@ permissions:
anticheat.check.waterwalk: anticheat.check.waterwalk:
description: Allow players to walk on water description: Allow players to walk on water
default: false default: false
anticheat.check.noswing:
description: Allow players to not ever swing their arm
default: false
anticheat.check.fastbreak:
description: Allow players to quickly break blocks
default: false
anticheat.check.fastplace: anticheat.check.fastplace:
description: Allow players to use build hacks and fastplace description: Allow players to use build hacks and fastplace
default: false default: false
@@ -112,9 +106,6 @@ permissions:
anticheat.check.fastinventory: anticheat.check.fastinventory:
description: Allow players to use fastloot and similar inventory hacks description: Allow players to use fastloot and similar inventory hacks
default: false default: false
anticheat.check.autotool:
description: Allow players to use autotool to switch tools quickly
default: false
anticheat.check.morepackets: anticheat.check.morepackets:
description: Allow players to send lots of movement packets or modify their timer description: Allow players to send lots of movement packets or modify their timer
default: false default: false
@@ -143,8 +134,6 @@ permissions:
anticheat.check.flight: true anticheat.check.flight: true
anticheat.check.elytrafly: true anticheat.check.elytrafly: true
anticheat.check.waterwalk: true anticheat.check.waterwalk: true
anticheat.check.noswing: true
anticheat.check.fastbreak: true
anticheat.check.fastplace: true anticheat.check.fastplace: true
anticheat.check.chatspam: true anticheat.check.chatspam: true
anticheat.check.commandspam: true anticheat.check.commandspam: true
@@ -158,15 +147,14 @@ permissions:
anticheat.check.fasteat: true anticheat.check.fasteat: true
anticheat.check.fastheal: true anticheat.check.fastheal: true
anticheat.check.killaura: true anticheat.check.killaura: true
anticheat.check.unicode: true
anticheat.check.fastprojectile: true anticheat.check.fastprojectile: true
anticheat.check.itemspam: true anticheat.check.itemspam: true
anticheat.check.fastinventory: true anticheat.check.fastinventory: true
anticheat.check.autotool: true
anticheat.check.morepackets: true anticheat.check.morepackets: true
anticheat.check.badpackets: true anticheat.check.badpackets: true
anticheat.check.velocity: true anticheat.check.velocity: true
anticheat.check.criticals: true anticheat.check.criticals: true
anticheat.check.unicode: true
anticheat.check.illegalinteract: true anticheat.check.illegalinteract: true
anticheat.check.fastladder: true anticheat.check.fastladder: true
anticheat.check.aimbot: true anticheat.check.aimbot: true