Optimize some stuff and fix some other stuff

This commit is contained in:
2025-09-05 07:47:26 +02:00
parent 1b306b7455
commit c467c3db1f
4 changed files with 6 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);