Replace City region bounds safely

This commit is contained in:
2026-09-26 23:52:15 -07:00
parent 1eab80ab2b
commit bc39305e90
3 changed files with 13 additions and 10 deletions

View File

@@ -779,9 +779,14 @@ public class MetropolisPlugin extends JavaPlugin {
min = getPlotMin(-size/2, -size/2, 1);
max = getPlotMax(size/2, size/2, 1);
region.setMinimumPoint(min);
region.setMaximumPoint(max);
ProtectedCuboidRegion resizedRegion = new ProtectedCuboidRegion(region.getId(), min, max);
resizedRegion.copyFrom(region);
regionManager.removeRegion(region.getId());
regionManager.addRegion(resizedRegion);
_cityRegion = resizedRegion;
_cityCuboid = new Cuboid(min, max);
saveRegions();
}
}