Move some tab complete messages to debug mode only (#3739)

This commit is contained in:
Josh Roy 2020-10-22 15:15:02 -04:00 committed by GitHub
parent 9cda59511e
commit 80e7558fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -348,13 +348,17 @@ public abstract class EssentialsCommand implements IEssentialsCommand {
}
final int numArgs = args.length - index - 1;
ess.getLogger().info(numArgs + " " + index + " " + Arrays.toString(args));
if (ess.getSettings().isDebug()) {
ess.getLogger().info(numArgs + " " + index + " " + Arrays.toString(args));
}
String[] effectiveArgs = new String[numArgs];
System.arraycopy(args, index, effectiveArgs, 0, numArgs);
if (effectiveArgs.length == 0) {
effectiveArgs = new String[] {""};
}
ess.getLogger().info(command + " -- " + Arrays.toString(effectiveArgs));
if (ess.getSettings().isDebug()) {
ess.getLogger().info(command + " -- " + Arrays.toString(effectiveArgs));
}
return command.tabComplete(sender.getSender(), label, effectiveArgs);
}