mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fixed false positive with slow falling potion and upped default teleport protection
This commit is contained in:
1 parent
cc51e9307f
commit
50247f28c9
3 files changed
+10
-3
No files matched your search
@@ -285,8 +285,8 @@ public class Backend {
|
||||
UUID uuid = player.getUniqueId();
|
||||
if (player.getGameMode() != GameMode.CREATIVE && !player.isInsideVehicle() && !player.isSleeping()
|
||||
&& !isMovingExempt(player) && !justPlaced(player) && !Utilities.isInWater(player)
|
||||
&& !Utilities.isInWeb(player)
|
||||
&& !player.getLocation().getBlock().getType().name().endsWith("TRAPDOOR")) {
|
||||
&& !Utilities.isInWeb(player) && !player.getLocation().getBlock().getType().name().endsWith("TRAPDOOR")
|
||||
&& !VersionUtil.isSlowFalling(player)) {
|
||||
if (player.getFallDistance() == 0) {
|
||||
if (nofallViolation.get(uuid) == null) {
|
||||
nofallViolation.put(uuid, 1);
|
||||
|
||||
@@ -70,6 +70,13 @@ public class VersionUtil {
|
||||
return p.isFlying() || p.isGliding() || p.hasPotionEffect(PotionEffectType.LEVITATION);
|
||||
}
|
||||
|
||||
public static boolean isSlowFalling(Player player) {
|
||||
if (isBountifulUpdate()) {
|
||||
return false;
|
||||
}
|
||||
return player.hasPotionEffect(PotionEffectType.SLOW_FALLING);
|
||||
}
|
||||
|
||||
public static boolean isFrostWalk(Player player) {
|
||||
if (player.getInventory().getBoots() == null || isBountifulUpdate()) {
|
||||
return false;
|
||||
|
||||
@@ -168,7 +168,7 @@ SPRINT_MAX: 0.2
|
||||
TELEPORT_MIN: 400
|
||||
# Time to exempt a player from moving because of teleporting
|
||||
# Increase in case of false positives
|
||||
TELEPORT_TIME: 800
|
||||
TELEPORT_TIME: 1000
|
||||
# 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
|
||||
|
||||
Reference in new issue
Block a user