Skip to content

Commit

Permalink
Make note of noPermMsg change
Browse files Browse the repository at this point in the history
This might actually be a bug, but until it's removed or fixed this note is still valid.
  • Loading branch information
PseudoKnight committed Feb 12, 2024
1 parent c26c935 commit cda45a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/laytonsmith/core/functions/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ public String docs() {
+ " or updates an existing one. Options is an associative array that can have the following keys:"
+ " description, usage, permission, noPermMsg, aliases, tabcompleter, and/or executor. ---- "
+ " The 'noPermMsg' argument is the message displayed when the user doesn't have the permission"
+ " specified in 'permission'. The 'usage' is the message shown when the 'executor' returns false."
+ " specified in 'permission' (unused as of Spigot 1.19)."
+ " The 'usage' is the message shown when the 'executor' returns false."
+ " The 'executor' is the closure run when the command is executed,"
+ " and can return true or false (by default is treated as true). The 'tabcompleter' is the closure"
+ " run when a user hits tab while the command is entered and ready for args."
Expand Down Expand Up @@ -341,7 +342,6 @@ public ExampleScript[] examples() throws ConfigCompileException {
+ "\t'description': 'Spread the love!',\n"
+ "\t'usage': '/hug <player>',\n"
+ "\t'permission': 'perms.hugs',\n"
+ "\t'noPermMsg': 'You do not have permission to give hugs to players (Sorry :o).',\n"
+ "\t'tabcompleter':\n"
+ "\t\tclosure(@alias, @sender, @args) {\n"
+ "\t\t\t// This replicates the default tabcompleter for registered commands.\n"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/docs/Advanced_Guide
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Commands may have additional annotations, which correspond to the values in regi
@usage - Overrides the default usage example
@permission - The permission the user must have to run this command. Note that this permission is in *addition* to the
normal alias permission system, and so it's recommended to continue using the * label on the alias itself.
@noPermMsg - Overrides the no permission error message
@noPermMsg - Overrides the no permission error message (unused as of Spigot 1.19)
@alias - Alias for this command. A command can have multiple aliases, and you can repeat this annotation to provide
more.

Expand Down

0 comments on commit cda45a1

Please sign in to comment.