Builder > Buffer

This commit is contained in:
GJ 2013-01-30 18:58:31 -05:00
parent fc5dda78f5
commit 01c8b8ad4a
3 changed files with 17 additions and 17 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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");