mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Comma-separate list of plot worlds
This commit is contained in:
parent
429fed2ab3
commit
6fc8bf587b
@ -2,11 +2,10 @@ package com.intellectualcrafters.plot.commands;
|
|||||||
|
|
||||||
import com.intellectualcrafters.plot.PS;
|
import com.intellectualcrafters.plot.PS;
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
import com.intellectualcrafters.plot.object.PlotArea;
|
|
||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
import com.intellectualcrafters.plot.object.RunnableVal;
|
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
import com.plotsquared.general.commands.CommandDeclaration;
|
import com.plotsquared.general.commands.CommandDeclaration;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
@CommandDeclaration(command = "debug",
|
@CommandDeclaration(command = "debug",
|
||||||
category = CommandCategory.DEBUG,
|
category = CommandCategory.DEBUG,
|
||||||
@ -29,13 +28,7 @@ public class Debug extends SubCommand {
|
|||||||
String header = C.DEBUG_HEADER.s();
|
String header = C.DEBUG_HEADER.s();
|
||||||
String line = C.DEBUG_LINE.s();
|
String line = C.DEBUG_LINE.s();
|
||||||
String section = C.DEBUG_SECTION.s();
|
String section = C.DEBUG_SECTION.s();
|
||||||
final StringBuilder worlds = new StringBuilder("");
|
String worlds = StringUtils.join(PS.get().getPlotAreas(), ", ");
|
||||||
PS.get().foreachPlotArea(new RunnableVal<PlotArea>() {
|
|
||||||
@Override
|
|
||||||
public void run(PlotArea value) {
|
|
||||||
worlds.append(value.toString()).append(" ");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
information.append(header);
|
information.append(header);
|
||||||
information.append(getSection(section, "PlotArea"));
|
information.append(getSection(section, "PlotArea"));
|
||||||
information.append(getLine(line, "Plot Worlds", worlds));
|
information.append(getLine(line, "Plot Worlds", worlds));
|
||||||
|
Loading…
Reference in New Issue
Block a user