mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 06:28:52 +00:00
Reformatting, update to 1.17, performance and general improvements, improved WaterWalk
This commit is contained in:
1 parent
f637facbea
commit
7739eb9ca0
19 files changed
+676
-705
No files matched your search
@@ -38,18 +38,18 @@ public class WaterWalkCheck {
|
||||
|
||||
private static final CheckResult PASS = new CheckResult(CheckResult.Result.PASSED);
|
||||
|
||||
public static CheckResult runCheck(Player player, double x, double y, double z) {
|
||||
UUID uuid = player.getUniqueId();
|
||||
User user = AntiCheatReloaded.getManager().getUserManager().getUser(uuid);
|
||||
MovementManager movementManager = user.getMovementManager();
|
||||
public static CheckResult runCheck(final Player player, final double x, final double y, final double z) {
|
||||
final UUID uuid = player.getUniqueId();
|
||||
final User user = AntiCheatReloaded.getManager().getUserManager().getUser(uuid);
|
||||
final MovementManager movementManager = user.getMovementManager();
|
||||
|
||||
if (movementManager.distanceXZ <= 0 || player.getVehicle() != null || Utilities.isOnLilyPad(player)
|
||||
|| movementManager.riptideTicks > 0 || VersionUtil.isSwimming(player) || VersionUtil.isFlying(player)
|
||||
|| player.getLocation().getBlock().getType().name().endsWith("CARPET"))
|
||||
return PASS;
|
||||
|
||||
Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks();
|
||||
Block blockBeneath = player.getLocation().clone().subtract(0, 0.1, 0).getBlock();
|
||||
final Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks();
|
||||
final Block blockBeneath = player.getLocation().clone().subtract(0, 0.1, 0).getBlock();
|
||||
if (checksConfig.isSubcheckEnabled(CheckType.WATER_WALK, "walk") && blockBeneath.isLiquid()
|
||||
&& Utilities.isSurroundedByWater(player)
|
||||
&& ((movementManager.motionY == 0 && movementManager.lastMotionY == 0)
|
||||
|
||||
Reference in new issue
Block a user