Skip to content

Commit 6df484b

Browse files
authored
Update CrashC.java (#2350)
1 parent a46d296 commit 6df484b

File tree

1 file changed

+3
-4
lines changed
  • common/src/main/java/ac/grim/grimac/checks/impl/crash

1 file changed

+3
-4
lines changed

common/src/main/java/ac/grim/grimac/checks/impl/crash/CrashC.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ public void onPacketReceive(PacketReceiveEvent event) {
2020
WrapperPlayClientPlayerFlying flying = new WrapperPlayClientPlayerFlying(event);
2121
if (flying.hasPositionChanged()) {
2222
Location pos = flying.getLocation();
23-
if (Double.isNaN(pos.getX()) || Double.isNaN(pos.getY()) || Double.isNaN(pos.getZ())
24-
|| Double.isInfinite(pos.getX()) || Double.isInfinite(pos.getY()) || Double.isInfinite(pos.getZ()) ||
25-
Float.isNaN(pos.getYaw()) || Float.isNaN(pos.getPitch()) ||
26-
Float.isInfinite(pos.getYaw()) || Float.isInfinite(pos.getPitch())) {
23+
if (!Double.isFinite(pos.getX()) || !Double.isFinite(pos.getY()) || !Double.isFinite(pos.getZ())
24+
|| !Float.isFinite(pos.getYaw()) || !Float.isFinite(pos.getPitch())
25+
) {
2726
flagAndAlert("xyzYP: " + pos.getX() + ", " + pos.getY() + ", " + pos.getZ() + ", " + pos.getYaw() + ", " + pos.getPitch());
2827
player.getSetbackTeleportUtil().executeViolationSetback();
2928
event.setCancelled(true);

0 commit comments

Comments
 (0)