mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Builder > Buffer
This commit is contained in:
parent
fc5dda78f5
commit
01c8b8ad4a
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user