@@ -59,6 +59,7 @@ public class GenericCommandHelpTopic extends HelpTopic {
|
||||
fullText = sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSee(@NotNull CommandSender sender) {
|
||||
if (!command.isRegistered()) {
|
||||
// Unregistered commands should not show up in the help
|
||||
|
||||
@@ -26,6 +26,7 @@ public final class HelpTopicComparator implements Comparator<HelpTopic> {
|
||||
|
||||
private HelpTopicComparator() {}
|
||||
|
||||
@Override
|
||||
public int compare(@NotNull HelpTopic lhs, @NotNull HelpTopic rhs) {
|
||||
return tnc.compare(lhs.getName(), rhs.getName());
|
||||
}
|
||||
@@ -33,6 +34,7 @@ public final class HelpTopicComparator implements Comparator<HelpTopic> {
|
||||
public static final class TopicNameComparator implements Comparator<String> {
|
||||
private TopicNameComparator(){}
|
||||
|
||||
@Override
|
||||
public int compare(@NotNull String lhs, @NotNull String rhs) {
|
||||
boolean lhsStartSlash = lhs.startsWith("/");
|
||||
boolean rhsStartSlash = rhs.startsWith("/");
|
||||
|
||||
@@ -44,6 +44,7 @@ public class IndexHelpTopic extends HelpTopic {
|
||||
this.allTopics = topics;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSee(@NotNull CommandSender sender) {
|
||||
if (sender instanceof ConsoleCommandSender) {
|
||||
return true;
|
||||
@@ -59,6 +60,7 @@ public class IndexHelpTopic extends HelpTopic {
|
||||
permission = amendedPermission;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getFullText(@NotNull CommandSender sender) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user