Turn manual array copies into System.arrayCopy

This commit is contained in:
riking
2014-06-03 18:19:37 -07:00
parent d32a077359
commit 009df4a0ad
4 changed files with 4 additions and 12 deletions

View File

@@ -38,9 +38,7 @@ public class DisguisePlayerCommand extends BaseDisguiseCommand {
return true;
}
String[] newArgs = new String[args.length - 1];
for (int i = 0; i < newArgs.length; i++) {
newArgs[i] = args[i + 1];
}
System.arraycopy(args, 1, newArgs, 0, newArgs.length);
Disguise disguise;
try {
disguise = parseDisguise(sender, newArgs);

View File

@@ -86,9 +86,7 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand {
radius = maxRadius;
}
String[] newArgs = new String[args.length - (starting + 1)];
for (int i = 0; i < newArgs.length; i++) {
newArgs[i] = args[i + (starting + 1)];
}
System.arraycopy(args, starting + 1, newArgs, 0, newArgs.length);
Disguise disguise;
try {
disguise = parseDisguise(sender, newArgs);