fix: load single plot areas on creation (#4490)

* fix: load single plot areas on creation

* fix: don't allow overlapping plot areas
This commit is contained in:
Pierre Maurice Schwang 2024-09-14 10:46:27 +02:00 committed by GitHub
parent 5fc8e06c22
commit 001ae78fb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -795,9 +795,8 @@ public class PlotSquared {
if (world.equals("CheckingPlotSquaredGenerator")) {
return;
}
if (!this.getPlotAreaManager().addWorld(world)) {
return;
}
// Don't check the return result -> breaks runtime loading of single plot areas on creation
this.getPlotAreaManager().addWorld(world);
Set<String> worlds;
if (this.worldConfiguration.contains("worlds")) {
worlds = this.worldConfiguration.getConfigurationSection("worlds").getKeys(false);

View File

@ -184,6 +184,7 @@ public class Area extends SubCommand {
CuboidRegion.makeCuboid(playerSelectedRegion)
).length != 0) {
player.sendMessage(TranslatableCaption.of("single.single_area_overlapping"));
return false;
}
// Alter the region
final BlockVector3 playerSelectionMin = playerSelectedRegion.getMinimumPoint();