From ce7992e64feeec212163bb20a9c704a9d78bcc55 Mon Sep 17 00:00:00 2001 From: OhPointFive Date: Thu, 11 Aug 2022 15:32:20 -0400 Subject: [PATCH] Skip removing players Signed-off-by: OhPointFive --- .../java/tc/oc/pgm/action/actions/KillEntitiesAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/tc/oc/pgm/action/actions/KillEntitiesAction.java b/core/src/main/java/tc/oc/pgm/action/actions/KillEntitiesAction.java index 62a28d230c..c9c46007e1 100644 --- a/core/src/main/java/tc/oc/pgm/action/actions/KillEntitiesAction.java +++ b/core/src/main/java/tc/oc/pgm/action/actions/KillEntitiesAction.java @@ -2,6 +2,7 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Item; +import org.bukkit.entity.Player; import org.bukkit.event.entity.ItemDespawnEvent; import tc.oc.pgm.api.filter.Filter; import tc.oc.pgm.api.match.Match; @@ -23,7 +24,8 @@ public void trigger(Match match) { .getEntities() .forEach( (Entity entity) -> { - if (filter.query(new EntityQuery(null, entity)).isAllowed()) { + if (!(entity instanceof Player) + && filter.query(new EntityQuery(null, entity)).isAllowed()) { if (entity instanceof Item) { match.callEvent(new ItemDespawnEvent((Item) entity, entity.getLocation())); }