diff --git a/src/com/massivecraft/massivecore/command/MassiveCommandHelp.java b/src/com/massivecraft/massivecore/command/MassiveCommandHelp.java index 17c2c045..24d1c1e8 100644 --- a/src/com/massivecraft/massivecore/command/MassiveCommandHelp.java +++ b/src/com/massivecraft/massivecore/command/MassiveCommandHelp.java @@ -68,12 +68,15 @@ public class MassiveCommandHelp extends MassiveCommand boolean visible = super.isVisibleTo(sender); if ( ! (this.hasParent() && visible)) return visible; + int visibleSiblingCount = 0; + for (MassiveCommand sibling : this.getParent().getChildren()) + { + if (sibling == this) continue; + if (sibling.isVisibleTo(sender)) visibleSiblingCount++; + } + int pageHeight = (sender instanceof Player) ? Txt.PAGEHEIGHT_PLAYER : Txt.PAGEHEIGHT_CONSOLE; - - // Minues one, don't count ourself. - int size = this.getParent().getChildren().size()-1; - - if (size <= pageHeight) + if (visibleSiblingCount <= pageHeight) { return false; }