Skip to content

Commit

Permalink
Skip removing players
Browse files Browse the repository at this point in the history
Signed-off-by: OhPointFive <[email protected]>
  • Loading branch information
OhPointFive committed Sep 1, 2022
1 parent 9ee20a8 commit ce7992e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()));
}
Expand Down

0 comments on commit ce7992e

Please sign in to comment.