Skip to content

Commit

Permalink
Merge branch 'dev/patch' into fix/expr-drops
Browse files Browse the repository at this point in the history
  • Loading branch information
Moderocky authored Nov 1, 2023
2 parents 115c10b + 451b739 commit bf1d2d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/ch/njol/skript/effects/EffPush.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ protected void execute(final Event e) {
final Vector mod = d.getDirection(en);
if (v != null)
mod.normalize().multiply(v.doubleValue());
if (!(Double.isFinite(mod.getX()) && Double.isFinite(mod.getY()) && Double.isFinite(mod.getZ()))) {
// Some component of the mod vector is not finite, so just stop
return;
}
en.setVelocity(en.getVelocity().add(mod)); // REMIND add NoCheatPlus exception to players
}
}
Expand Down

0 comments on commit bf1d2d0

Please sign in to comment.