From 6fc8bf587be6129298eabaa27c3623c0f8f2c3bd Mon Sep 17 00:00:00 2001 From: manuelgu Date: Wed, 30 Mar 2016 14:43:16 +0200 Subject: [PATCH] Comma-separate list of plot worlds --- .../com/intellectualcrafters/plot/commands/Debug.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Debug.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Debug.java index c0879c059..464bd0e96 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Debug.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Debug.java @@ -2,11 +2,10 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.PlotArea; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.util.MainUtil; import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; @CommandDeclaration(command = "debug", category = CommandCategory.DEBUG, @@ -29,13 +28,7 @@ public class Debug extends SubCommand { String header = C.DEBUG_HEADER.s(); String line = C.DEBUG_LINE.s(); String section = C.DEBUG_SECTION.s(); - final StringBuilder worlds = new StringBuilder(""); - PS.get().foreachPlotArea(new RunnableVal() { - @Override - public void run(PlotArea value) { - worlds.append(value.toString()).append(" "); - } - }); + String worlds = StringUtils.join(PS.get().getPlotAreas(), ", "); information.append(header); information.append(getSection(section, "PlotArea")); information.append(getLine(line, "Plot Worlds", worlds));