@@ -100,7 +100,14 @@ public final boolean onCommand(CommandSender sender, org.bukkit.command.Command
100100 return false ;
101101 }
102102
103- private boolean containsAny (String [] haystack , String needle ) {
103+ /**
104+ * Checks if the given array contains the given string (case insensitive).
105+ *
106+ * @param haystack array to search for the needle
107+ * @param needle string to search in the array
108+ * @return true if the string was found in the array, false if not
109+ */
110+ private static boolean containsAny (String [] haystack , String needle ) {
104111 for (String s : haystack ) {
105112 if (needle .equalsIgnoreCase (s )) {
106113 return true ;
@@ -173,6 +180,12 @@ private void onUsageHelpCommand(CommandSender sender, String command) {
173180 }
174181 }
175182
183+ /**
184+ * Sends the help line of the given command to the given command sender.
185+ *
186+ * @param sender command sender to send the help line to
187+ * @param command command to send the help line for
188+ */
176189 protected void sendHelpLine (CommandSender sender , Command command ) {
177190 if (command .value ().length > 0 ) {
178191 sender .sendMessage ("/" + parentCommand + " " + command .value ()[0 ] + " - " + command .description ());
@@ -181,6 +194,12 @@ protected void sendHelpLine(CommandSender sender, Command command) {
181194 }
182195 }
183196
197+ /**
198+ * Sends usage help for the given command to the given command sender.
199+ *
200+ * @param sender command sender to send the usage help to
201+ * @param command command to send the usage help for
202+ */
184203 protected void sendUsageHelp (CommandSender sender , Command command ) {
185204 sender .sendMessage (command .description ());
186205 if (command .usage ().length > 0 ) {
0 commit comments