An ArgumentType
that parses booleans.
More...
|
Boolean | parse (final StringReader reader) throws CommandSyntaxException |
|
Collection< String > | getExamples () |
|
An ArgumentType
that parses booleans.
◆ bool()
static BoolArgumentType com.mojang.brigadier.arguments.BoolArgumentType.bool |
( |
| ) |
|
|
static |
A factory method as a simple way to get an instance.
It is recommended to statically import this method to provide an interface similar to:
argument("name", bool())
- Returns
- an instance of this class
◆ getBool()
static boolean com.mojang.brigadier.arguments.BoolArgumentType.getBool |
( |
final CommandContext<?> |
context, |
|
|
final String |
name |
|
) |
| |
|
static |
Retrieves the argument with the given name from the context and casts it to a boolean.
- Parameters
-
- Returns
- the argument as a boolean
- See also
- CommandContext::getArgument