mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-23 16:41:19 +01:00
fix: switch tab complete to empty arrays from null returns
This commit is contained in:
parent
ef9241e260
commit
9deb765ad5
@ -125,10 +125,16 @@ public class CommandWithSubCommands implements CommandTemplate {
|
||||
if (subCommandName.equalsIgnoreCase(args[0])) {
|
||||
SubCommand subCommand = this.getSubCommand(subCommandName);
|
||||
if (subCommand.hasPermission(sender)) {
|
||||
return this.filterTabResults(this.getSubCommand(subCommandName).onTabComplete(sender, args),
|
||||
List<String> tabComplete = this.filterTabResults(this.getSubCommand(subCommandName).onTabComplete(sender, args),
|
||||
args[args.length - 1]);
|
||||
if(tabComplete != null) {
|
||||
return tabComplete;
|
||||
}
|
||||
else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ command.reload.detailedhelp=Reloads all portal data from files in the data folde
|
||||
command.reload.reloaded= All Advanced Portals data reloaded
|
||||
|
||||
command.create.help=Creates portals
|
||||
command.create.error= There was an error making the portal:
|
||||
command.create.error= There was a problem making the portal:
|
||||
command.create.console= You cannot create a portal using the console.
|
||||
command.create.detailedhelp=Format is /portal create (name) [tag:tagvalue] List tags after create in the format tag:value, if your value needs spaces use the format tag:"value with spaces"
|
||||
command.create.complete= The portal has been successfully created.
|
||||
|
Loading…
Reference in New Issue
Block a user