diff --git a/common/src/main/java/net/william278/husktowns/command/TownCommand.java b/common/src/main/java/net/william278/husktowns/command/TownCommand.java index 1dbee56c..6e4666e6 100644 --- a/common/src/main/java/net/william278/husktowns/command/TownCommand.java +++ b/common/src/main/java/net/william278/husktowns/command/TownCommand.java @@ -195,10 +195,20 @@ public void execute(@NotNull CommandUser executor, @NotNull String[] args) { .toList())) .flatMap((worldMap) -> worldMap.getValue().stream() .peek(claim -> total.getAndIncrement()) - .map(claim -> MapSquare.claim(claim.claim().getChunk(), worldMap.getKey(), claim, plugin)) + .map(claim -> MapSquare.claim( + claim.claim().getChunk(), + worldMap.getKey(), + claim, + plugin + )) .map(MapSquare::toComponent) - .map(square -> column.getAndIncrement() > SQUARES_PER_DEEDS_COLUMN - ? square.appendNewline() : square)) + .map(square -> { + if (column.getAndIncrement() > SQUARES_PER_DEEDS_COLUMN) { + column.set(0); + return square.appendNewline(); + } + return square; + })) .reduce(Component.empty(), Component::append); plugin.getLocales().getLocale("town_deeds_title", town.getName(),