mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Update dependencies, fix false positive with spectator mode, fix WaterWalk false positive (#198)
This commit is contained in:
1 parent
c39d224ce9
commit
15ba2a09b0
3 files changed
+5
-4
No files matched your search
@@ -44,7 +44,7 @@ public final class WaterWalkCheck {
|
||||
final MovementManager movementManager = user.getMovementManager();
|
||||
|
||||
if (movementManager.distanceXZ <= 0 || player.getVehicle() != null || Utilities.isOnLilyPad(player) || Utilities.isOnCarpet(player)
|
||||
|| movementManager.riptideTicks > 0 || VersionUtil.isSwimming(player) || VersionUtil.isFlying(player)) {
|
||||
|| movementManager.riptideTicks > 0 || VersionUtil.isSwimming(player) || VersionUtil.isFlying(player) || user.getVelocityTracker().isVelocitized()) {
|
||||
return PASS;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@@ -59,7 +60,7 @@ public class VersionUtil {
|
||||
}
|
||||
|
||||
public static boolean isFlying(final Player player) {
|
||||
return player.isFlying() || player.isGliding() || player.hasPotionEffect(PotionEffectType.LEVITATION)
|
||||
return player.isFlying() || player.getGameMode() == GameMode.SPECTATOR || player.isGliding() || player.hasPotionEffect(PotionEffectType.LEVITATION)
|
||||
|| AntiCheatReloaded.getManager().getBackend().justLevitated(player);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user