diff --git a/src/main/java/com/gmail/nossr50/party/commands/ACommand.java b/src/main/java/com/gmail/nossr50/party/commands/ACommand.java index f577b2014..5a191479b 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/ACommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/ACommand.java @@ -48,15 +48,15 @@ public class ACommand implements CommandExecutor { return true; default: - StringBuffer buffer = new StringBuffer(); - buffer.append(args[0]); + StringBuilder builder = new StringBuilder(); + builder.append(args[0]); for (int i = 1; i < args.length; i++) { - buffer.append(" "); - buffer.append(args[i]); + builder.append(" "); + builder.append(args[i]); } - String message = buffer.toString(); + String message = builder.toString(); if (sender instanceof Player) { Player player = (Player) sender; diff --git a/src/main/java/com/gmail/nossr50/party/commands/PCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PCommand.java index b099d03c3..e5612b949 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PCommand.java @@ -64,15 +64,15 @@ public class PCommand implements CommandExecutor { return true; } - StringBuffer buffer = new StringBuffer(); - buffer.append(args[0]); + StringBuilder builder = new StringBuilder(); + builder.append(args[0]); for (int i = 1; i < args.length; i++) { - buffer.append(" "); - buffer.append(args[i]); + builder.append(" "); + builder.append(args[i]); } - String message = buffer.toString(); + String message = builder.toString(); McMMOPartyChatEvent chatEvent = new McMMOPartyChatEvent(plugin, player.getName(), party.getName(), message); plugin.getServer().getPluginManager().callEvent(chatEvent); @@ -101,15 +101,15 @@ public class PCommand implements CommandExecutor { return true; } - StringBuffer buffer = new StringBuffer(); - buffer.append(args[1]); + StringBuilder builder = new StringBuilder(); + builder.append(args[1]); for (int i = 2; i < args.length; i++) { - buffer.append(" "); - buffer.append(args[i]); + builder.append(" "); + builder.append(args[i]); } - String message = buffer.toString(); + String message = builder.toString(); McMMOPartyChatEvent chatEvent = new McMMOPartyChatEvent(plugin, "Console", args[0], message); plugin.getServer().getPluginManager().callEvent(chatEvent); diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java index aa01c1c63..b1f7eab7d 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java @@ -108,7 +108,7 @@ public class PartyCommand implements CommandExecutor { Server server = mcMMO.p.getServer(); String leader = party.getLeader(); - StringBuffer tempList = new StringBuffer(); + StringBuilder tempList = new StringBuilder(); int membersNear = PartyManager.getNearMembers(player, party, ShareHandler.partyShareRange).size(); int membersOnline = party.getOnlineMembers().size() - 1; @@ -128,7 +128,7 @@ public class PartyCommand implements CommandExecutor { else { tempList.append(ChatColor.GRAY); } - tempList.append(otherPlayerName + " "); + tempList.append(otherPlayerName).append(" "); } String status = LocaleLoader.getString("Party.Status.Locked");