SPIGOT-6771: Help command tab completion does not respect permissions

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2021-10-24 20:33:42 +11:00
parent ef5b7235a1
commit 567948a8d1

View File

@ -122,6 +122,9 @@ public class HelpCommand extends BukkitCommand {
List<String> matchedTopics = new ArrayList<String>();
String searchString = args[0];
for (HelpTopic topic : Bukkit.getServer().getHelpMap().getHelpTopics()) {
if (!topic.canSee(sender)) {
continue;
}
String trimmedTopic = topic.getName().startsWith("/") ? topic.getName().substring(1) : topic.getName();
if (trimmedTopic.startsWith(searchString)) {