mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Removed unused timer check
This commit is contained in:
1 parent
91f5fcd31c
commit
76c595e255
4 files changed
+4
-36
No files matched your search
@@ -372,27 +372,6 @@ public class Backend {
|
|||||||
return PASS;
|
return PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheckResult checkTimer(Player player) {
|
|
||||||
UUID uuid = player.getUniqueId();
|
|
||||||
int step = 1;
|
|
||||||
if (steps.containsKey(uuid)) {
|
|
||||||
step = steps.get(uuid) + 1;
|
|
||||||
}
|
|
||||||
if (step == 1) {
|
|
||||||
stepTime.put(uuid, System.currentTimeMillis());
|
|
||||||
}
|
|
||||||
incrementOld(player, steps, step);
|
|
||||||
if (step == magic.TIMER_STEP_CHECK()) {
|
|
||||||
long time = System.currentTimeMillis() - stepTime.get(uuid);
|
|
||||||
steps.put(uuid, 0);
|
|
||||||
if (time < magic.TIMER_TIMEMIN()) {
|
|
||||||
return new CheckResult(CheckResult.Result.FAILED, "tried to alter their timer, took " + step
|
|
||||||
+ " steps in " + time + " ms (min = " + magic.TIMER_TIMEMIN() + " ms)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return PASS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void logAscension(Player player, double y1, double y2) {
|
public void logAscension(Player player, double y1, double y2) {
|
||||||
UUID name = player.getUniqueId();
|
UUID name = player.getUniqueId();
|
||||||
if (y1 < y2 && !isAscending.contains(name)) {
|
if (y1 < y2 && !isAscending.contains(name)) {
|
||||||
@@ -414,6 +393,7 @@ public class Backend {
|
|||||||
&& !justBroke(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock())
|
&& !justBroke(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock())
|
||||||
&& !player.isInsideVehicle() && !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1, 0).getBlock())
|
&& !player.isInsideVehicle() && !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1, 0).getBlock())
|
||||||
&& !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1.5, 0).getBlock())) {
|
&& !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1.5, 0).getBlock())) {
|
||||||
|
// TODO isMoveUpBlock does not seem to be a success with stairs
|
||||||
if (y1 < y2) {
|
if (y1 < y2) {
|
||||||
if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid()
|
if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid()
|
||||||
&& !block.getRelative(BlockFace.EAST).isLiquid()
|
&& !block.getRelative(BlockFace.EAST).isLiquid()
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ public class GlideCheck {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// TODO more sophisticated check
|
if (fallDistance > LAST_FALL_DISTANCE.get(player.getUniqueId()) && !player.isOnGround()) {
|
||||||
|
// TODO check gravity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LAST_DIFFERENCE.put(player.getUniqueId(), distance.getYDifference());
|
LAST_DIFFERENCE.put(player.getUniqueId(), distance.getYDifference());
|
||||||
LAST_FALL_DISTANCE.put(player.getUniqueId(), player.getFallDistance());
|
LAST_FALL_DISTANCE.put(player.getUniqueId(), player.getFallDistance());
|
||||||
|
|||||||
@@ -350,14 +350,6 @@ public interface Magic {
|
|||||||
* The minimum time it should have taken for the player to click X times; Type=INTEGER; Leniency=INCREASE.
|
* The minimum time it should have taken for the player to click X times; Type=INTEGER; Leniency=INCREASE.
|
||||||
*/
|
*/
|
||||||
public int INVENTORY_TIMEMIN();
|
public int INVENTORY_TIMEMIN();
|
||||||
/**
|
|
||||||
* The number of steps we should wait before checking if the player has used timer cheating; Type=INTEGER; Leniency=INCREASE.
|
|
||||||
*/
|
|
||||||
public int TIMER_STEP_CHECK();
|
|
||||||
/**
|
|
||||||
* The minimum time it should have taken for the player to travel X steps; Type=SYSTEM; Leniency=DECREASE.
|
|
||||||
*/
|
|
||||||
public int TIMER_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.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -166,12 +166,6 @@ TELEPORT_MIN: 400
|
|||||||
# Time to exempt a player from moving because of teleporting
|
# Time to exempt a player from moving because of teleporting
|
||||||
# Increase in case of false positives
|
# Increase in case of false positives
|
||||||
TELEPORT_TIME: 1000
|
TELEPORT_TIME: 1000
|
||||||
# The number of steps we should wait before checking if the player has used timer cheating
|
|
||||||
# Increase in case of false positives
|
|
||||||
TIMER_STEP_CHECK: 50
|
|
||||||
# The minimum time it should have taken for the player to travel X steps
|
|
||||||
# Decrease in case of false positives
|
|
||||||
TIMER_TIMEMIN: 2000
|
|
||||||
# Maximum time a player is considered to have a change in velocity
|
# 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
|
# This is a set value and shouldn't be changed unless you know what you're doing
|
||||||
VELOCITY_CHECKTIME: 2100
|
VELOCITY_CHECKTIME: 2100
|
||||||
|
|||||||
Reference in new issue
Block a user