From 7f05e92ff6380d43455779db426fb23c9e447fa1 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 2 Nov 2020 16:30:55 +0100 Subject: [PATCH 1/2] Add Delete Arrow --- src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java b/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java index cf30126..d64500b 100644 --- a/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java +++ b/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java @@ -57,7 +57,7 @@ public class PlayerSeatListener extends BasicListener { @EventHandler public void onEntityDismount(EntityDismountEvent event) { - if(event.getEntity().getType() != EntityType.ARROW) + if(event.getDismounted().getType() != EntityType.ARROW) return; if(event.getEntityType() != EntityType.PLAYER) From 3431c02194a6944b07fdb75e84f0fa15aa9a4d15 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 8 Nov 2020 09:38:31 +0100 Subject: [PATCH 2/2] Add Arrow Persistent --- src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java b/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java index d64500b..8b9183d 100644 --- a/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java +++ b/src/de/steamwar/spectatesystem/listener/PlayerSeatListener.java @@ -53,6 +53,7 @@ public class PlayerSeatListener extends BasicListener { arrow.setGravity(false); arrow.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED); arrow.addPassenger(event.getPlayer()); + arrow.setPersistent(true); } @EventHandler