Created
March 14, 2020 16:22
-
-
Save thinkverse/e63caaaafea5d944fb839e8b81a6e5b4 to your computer and use it in GitHub Desktop.
Tab Complete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) { | |
return (args.length == 1) ? Bukkit.getServer().getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList()) : Collections.emptyList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment