From 344a2afeffc9357d519ba772e4fce92b63724339 Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Tue, 22 Jan 2019 19:54:31 +0100 Subject: [PATCH] Use StringBuilder, like a sane person --- .../plotsquared/plot/commands/FlagCmd.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCmd.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCmd.java index a3d3e5b85..c875f44b9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCmd.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCmd.java @@ -279,16 +279,17 @@ import java.util.*; } flags.get(type).add(flag1.getName()); } - String message = ""; + StringBuilder message = new StringBuilder(); String prefix = ""; for (Map.Entry> entry : flags.entrySet()) { String category = entry.getKey(); List flagNames = entry.getValue(); 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"; } - MainUtil.sendMessage(player, message); + MainUtil.sendMessage(player, message.toString()); return true; } MainUtil.sendMessage(player, C.COMMAND_SYNTAX, "/plot flag ");