mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 16:42:03 -07:00
SPIGOT-6771: Help command tab completion does not respect permissions
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user