mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Use StringBuilder, like a sane person
This commit is contained in:
parent
e54f964eca
commit
344a2afeff
@ -279,16 +279,17 @@ import java.util.*;
|
|||||||
}
|
}
|
||||||
flags.get(type).add(flag1.getName());
|
flags.get(type).add(flag1.getName());
|
||||||
}
|
}
|
||||||
String message = "";
|
StringBuilder message = new StringBuilder();
|
||||||
String prefix = "";
|
String prefix = "";
|
||||||
for (Map.Entry<String, ArrayList<String>> entry : flags.entrySet()) {
|
for (Map.Entry<String, ArrayList<String>> entry : flags.entrySet()) {
|
||||||
String category = entry.getKey();
|
String category = entry.getKey();
|
||||||
List<String> flagNames = entry.getValue();
|
List<String> flagNames = entry.getValue();
|
||||||
Collections.sort(flagNames);
|
Collections.sort(flagNames);
|
||||||
message += prefix + "&6" + category + ": &7" + StringMan.join(flagNames, ", ");
|
message.append(prefix).append("&6").append(category).append(": &7")
|
||||||
|
.append(StringMan.join(flagNames, ", "));
|
||||||
prefix = "\n";
|
prefix = "\n";
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, message);
|
MainUtil.sendMessage(player, message.toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, C.COMMAND_SYNTAX, "/plot flag <set|remove|add|list|info>");
|
MainUtil.sendMessage(player, C.COMMAND_SYNTAX, "/plot flag <set|remove|add|list|info>");
|
||||||
|
Loading…
Reference in New Issue
Block a user