Update Region System of BauSystem

This commit is contained in:
2025-08-02 13:25:22 +02:00
parent 8427ae36f2
commit 6822dc796f
73 changed files with 927 additions and 1796 deletions
@@ -21,12 +21,9 @@ package de.steamwar.bausystem.features.util;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.SWUtils;
import de.steamwar.bausystem.region.GlobalRegion;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.region.RegionUtils;
import de.steamwar.bausystem.region.utils.RegionExtensionType;
import de.steamwar.bausystem.region.utils.RegionSelectionType;
import de.steamwar.bausystem.region.utils.RegionType;
import de.steamwar.bausystem.region.RegionUtils;
import de.steamwar.command.SWCommand;
import de.steamwar.linkage.Linked;
import org.bukkit.Bukkit;
@@ -53,7 +50,7 @@ public class KillAllCommand extends SWCommand {
public void genericCommand(@Validator Player player, RegionSelectionType regionSelectionType) {
Region region = Region.getRegion(player.getLocation());
AtomicLong count = new AtomicLong(0);
if (regionSelectionType == RegionSelectionType.GLOBAL || GlobalRegion.getInstance() == region) {
if (regionSelectionType == RegionSelectionType.GLOBAL || region.getType().isGlobal()) {
WORLD.getEntities()
.stream()
.filter(e -> !(e instanceof Player))
@@ -66,7 +63,7 @@ public class KillAllCommand extends SWCommand {
WORLD.getEntities()
.stream()
.filter(e -> !(e instanceof Player))
.filter(e -> region.inRegion(e.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL))
.filter(e -> region.inRegion(e.getLocation()))
.forEach(entity -> {
entity.remove();
count.incrementAndGet();
@@ -74,5 +71,4 @@ public class KillAllCommand extends SWCommand {
RegionUtils.actionBar(region, "OTHER_KILLALL_REGION", count.get());
}
}
}
@@ -1,7 +1,7 @@
package de.steamwar.bausystem.features.util;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.regionnew.Point;
import de.steamwar.bausystem.region.Point;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.region.utils.RegionExtensionType;
import de.steamwar.bausystem.region.utils.RegionType;