mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +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
@ -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 New Issue
Block a user