From 567948a8d1d999b99ee246c07084b73e9300850b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 24 Oct 2021 20:33:42 +1100 Subject: [PATCH] SPIGOT-6771: Help command tab completion does not respect permissions By: md_5 --- .../src/main/java/org/bukkit/command/defaults/HelpCommand.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java index 98027fdd8d..80ffb7194f 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java @@ -122,6 +122,9 @@ public class HelpCommand extends BukkitCommand { List matchedTopics = new ArrayList(); 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)) {