mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
SPIGOT-6771: Help command tab completion does not respect permissions
By: md_5 <git@md-5.net>
This commit is contained in:
parent
ef5b7235a1
commit
567948a8d1
1 changed files with 3 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue