SteamWar/BauSystem2.0
Archiviert
12
0

Fix BlockCounterListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-12-14 19:49:31 +01:00
Ursprung 0f24ae298a
Commit f3a6319e4a

Datei anzeigen

@ -38,6 +38,9 @@ public class BlockCounterListener implements Listener {
@EventHandler @EventHandler
public void onEntityExplode(EntityExplodeEvent event) { public void onEntityExplode(EntityExplodeEvent event) {
Region region = Region.getRegion(event.getLocation()); Region region = Region.getRegion(event.getLocation());
if (region.isGlobal()) {
return;
}
List<Block> blockList = event.blockList(); List<Block> blockList = event.blockList();
blockList = blockList.stream().filter(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)).collect(Collectors.toList()); blockList = blockList.stream().filter(block -> region.inRegion(block.getLocation(), RegionType.TESTBLOCK, RegionExtensionType.EXTENSION)).collect(Collectors.toList());
if (blockList.isEmpty()) { if (blockList.isEmpty()) {