Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,20 @@ public JsonElement getJsonElement(@NotNull Town town, @Nullable String key) {
coordinatesObject.add("homeBlock", homeBlockArray);

JsonArray townBlocksArray = new JsonArray();
JsonArray moonOutpostsArray = new JsonArray();
for (TownBlock townBlock : town.getTownBlocks()) {
JsonArray townBlockArray = new JsonArray();
townBlockArray.add(townBlock.getX());
townBlockArray.add(townBlock.getZ());

townBlocksArray.add(townBlockArray);
if (townBlock.getWorld().getName().equals("earthmc_moon")) {
moonOutpostsArray.add(townBlockArray);
} else {
townBlocksArray.add(townBlockArray);
}
}
coordinatesObject.add("townBlocks", townBlocksArray);
coordinatesObject.add("moonOutposts", moonOutpostsArray);

townObject.add("coordinates", coordinatesObject);

Expand Down