Fix arrow stopper

This commit is contained in:
D4rkr34lm
2026-05-30 11:55:59 +02:00
parent 9934b8bbb2
commit 1de17d27f4
@@ -46,6 +46,7 @@ public class ArrowStopper {
private void run() { private void run() {
Recording.iterateOverEntities(AbstractArrow.class::isInstance, entity -> { Recording.iterateOverEntities(AbstractArrow.class::isInstance, entity -> {
Projectile arrow = (Projectile) entity; Projectile arrow = (Projectile) entity;
if(!(arrow.getShooter() instanceof Player)) return;
if (invalidEntity(arrow)) return; if (invalidEntity(arrow)) return;
Location prevLocation = arrow.getLocation().toVector().subtract(arrow.getVelocity()).toLocation(arrow.getWorld()); Location prevLocation = arrow.getLocation().toVector().subtract(arrow.getVelocity()).toLocation(arrow.getWorld());