Fixed NPE on bungee tab completion sometimes

This commit is contained in:
Risto Lahtela 2020-09-21 15:20:55 +03:00
parent eff5faba44
commit 2cf7725b58
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ public class Arguments {
}
public boolean isEmpty() {
return args.isEmpty();
return args.isEmpty() || args.get(0).isEmpty();
}
@Override

View File

@ -71,7 +71,7 @@ public class Subcommand {
}
public BiFunction<CMDSender, Arguments, List<String>> getArgumentResolver() {
return argumentResolver;
return argumentResolver != null ? argumentResolver : ((sender, arguments) -> Collections.emptyList());
}
public String getArgumentsAsString() {