-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Update the brigadier command docs and example * fix: Rename brigardier to brigadier * fix: Inline danger block
- Loading branch information
1 parent
7ceee30
commit 5e2b8ca
Showing
4 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
The following command illustrates how to use commands, subcommands, arguments and the command context. | ||
|
||
```kotlin | ||
command("gaming") { | ||
literal("set") { | ||
argument("state", BoolArgumentType.bool()) { | ||
suggestList { listOf(true, false) } | ||
runs { | ||
if (this.getArgument("state")) | ||
this.player.sendMessage("yoo gaming has been activated") | ||
else { | ||
this.player.kill() | ||
this.player.sendText("gaming disabled"){ color = KColors.INDIANRED } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters