Details string klist to strinbuilder

This commit is contained in:
CocoTheOwner 2021-08-06 23:10:44 +02:00
parent 93888aeed3
commit cb923cef47

View File

@ -168,16 +168,26 @@ public class CommandIrisPregenCreate extends MortarCommand {
} }
} }
KList<String> details = new KList<>( StringBuilder details = new StringBuilder("Pregeneration details:");
"Pregeneration details:",
" - World > " + world.getName(), details.append("\n")
" - Width/Height > " + width + "/" + height, .append(" - World > ")
" - Center x,z > " + x + "," + z, .append(world.getName())
failed.isEmpty() ? "(No failed arguments)" : "FAILED ARGS:" .append("\n")
); .append(" - Width/Height > ")
failed.forEach(s -> .append(width)
details.add(" - " + s) .append("/")
); .append(height)
.append("\n")
.append(" - Center x,z > ")
.append(x)
.append(",")
.append(z)
.append("\n")
.append(failed.isEmpty() ? "(No failed arguments)" : "FAILED ARGS:");
for (String s : failed) {
details.append(s).append("\n");
}
if (pregenerate(world, width, height, x, z)){ if (pregenerate(world, width, height, x, z)){
sender.sendMessage("Successfully started pregen"); sender.sendMessage("Successfully started pregen");