fix no args detected as 1 arg
This commit is contained in:
+3
@@ -15,6 +15,9 @@ public class BungeeCommand extends Command implements TabExecutor {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(args.length == 1 && args[0].isEmpty()) {
|
||||
args = new String[]{};
|
||||
}
|
||||
command.execute(new BungeeSender(sender), args);
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -20,7 +20,11 @@ public class VelocityCommand implements RawCommand {
|
||||
|
||||
@Override
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user