fix no args detected as 1 arg

This commit is contained in:
ajgeiss0702
2021-12-25 19:30:45 -07:00
parent 4682b05059
commit 3573c34bc6
2 changed files with 8 additions and 1 deletions
@@ -15,6 +15,9 @@ public class BungeeCommand extends Command implements TabExecutor {
@Override @Override
public void execute(CommandSender sender, String[] args) { public void execute(CommandSender sender, String[] args) {
if(args.length == 1 && args[0].isEmpty()) {
args = new String[]{};
}
command.execute(new BungeeSender(sender), args); command.execute(new BungeeSender(sender), args);
} }
@@ -20,7 +20,11 @@ public class VelocityCommand implements RawCommand {
@Override @Override
public void execute(Invocation invocation) { public void execute(Invocation invocation) {
command.execute(new VelocitySender(invocation.source()), invocation.arguments().split(" ")); String[] args = new String[]{};
if(!invocation.arguments().isEmpty()) {
args = invocation.arguments().split(" ");
}
command.execute(new VelocitySender(invocation.source()), args);
} }
@Override @Override