From 156ee1c7b1b9a18e379544f47d3e3632d4b3c0cc Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 29 Sep 2020 22:01:54 +0200 Subject: [PATCH] Fixed CME --- BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java index b96c414..bdb62b6 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java @@ -129,9 +129,7 @@ public class Detonator implements Listener { if(event.getPlayer().isSneaking()) { if(locs.stream().filter(detonatorActivation -> detonatorActivation.location.equals(event.getClickedBlock().getLocation())).collect(Collectors.toList()).size() == 1) { - locs.forEach(detonatorActivation -> { - if(detonatorActivation.location.equals(event.getClickedBlock().getLocation())) locs.remove(detonatorActivation); - }); + locs.removeIf(detonatorActivation -> detonatorActivation.location.equals(event.getClickedBlock().getLocation())); print(detoloader.addBack ? "§e" + detoloader.getBlock() + " entfernt" : detoloader.getBlock(), detoloader.addBack); }else {