mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Use StringBuilder, like a sane person
This commit is contained in:
parent
e54f964eca
commit
344a2afeff
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue