Optimize some stuff and fix some other stuff

This commit is contained in:
2026-03-16 21:08:25 +01:00
parent 1c49fa6ca0
commit fae26f2fe0
5 changed files with 8 additions and 6 deletions
@@ -36,7 +36,6 @@ import lombok.NonNull;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import sun.misc.Unsafe;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.RecordComponent;
@@ -138,6 +137,7 @@ public class DynamicRegionSystem implements RegionSystem {
return GlobalRegion.INSTANCE;
}
// TODO: Optimize later on!
private Region get(Location location, Collection<Region> regions) {
return regions.stream()
.filter(region -> region.getArea().inRegion(location, false))
@@ -87,7 +87,7 @@ public class RegionDataRepository {
regionCreators.put(MiniWarGear21DisplayRegion.class.getSimpleName(), MiniWarGear21DisplayRegion::new);
regionCreators.put("MiniWarGear21Region", MiniWarGear21WorkRegion::new); // TODO: Legacy because of rename
regionCreators.put(WarShip21WorkRegion.class.getSimpleName(), WarShip21WorkRegion::new);
regionCreators.put(WarShip21DisplayRegion.class.getSimpleName(), WarShip21WorkRegion::new);
regionCreators.put(WarShip21DisplayRegion.class.getSimpleName(), WarShip21DisplayRegion::new);
regionCreators.put("WarShip21Region", WarShip21WorkRegion::new); // TODO: Legacy because of rename
regionCreators.put(MicroWarGear21WorkRegion.class.getSimpleName(), MicroWarGear21WorkRegion::new);
regionCreators.put(MicroWarGear21DisplayRegion.class.getSimpleName(), MicroWarGear21DisplayRegion::new);