Class CommodoreBukkitBrigadier
java.lang.Object
revxrsal.commands.bukkit.brigadier.CommodoreBukkitBrigadier
- All Implemented Interfaces:
BukkitBrigadier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Registers an argument type for the given class.void
bind
(@NotNull Class<?> type, @NotNull ArgumentTypeResolver resolver) Registers an argument type resolver for the given class.void
bind
(@NotNull Class<?> type, @NotNull MinecraftArgumentType argumentType) Registers an argument type for the given class.@NotNull com.mojang.brigadier.arguments.ArgumentType<?>
getArgumentType
(@NotNull CommandParameter parameter) Returns the argument type corresponding to the given parameter.void
register()
Registers the command handler's brigadier@NotNull CommandActor
wrapSource
(@NotNull Object commandSource) Wraps Brigadier's command sender with the platform's appropriateCommandActor
-
Constructor Details
-
CommodoreBukkitBrigadier
-
-
Method Details
-
bind
Description copied from interface:BukkitBrigadier
Registers an argument type resolver for the given class. This will include subclasses as well.- Specified by:
bind
in interfaceBukkitBrigadier
- Parameters:
type
- Type to register forresolver
- The argument type resolver
-
bind
public void bind(@NotNull @NotNull Class<?> type, @NotNull @NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType) Description copied from interface:BukkitBrigadier
Registers an argument type for the given class. This will include subclasses as well.- Specified by:
bind
in interfaceBukkitBrigadier
- Parameters:
type
- Type to register forargumentType
- The argument type to register- See Also:
-
bind
public void bind(@NotNull @NotNull Class<?> type, @NotNull @NotNull MinecraftArgumentType argumentType) Description copied from interface:BukkitBrigadier
Registers an argument type for the given class. This will include subclasses as well.- Specified by:
bind
in interfaceBukkitBrigadier
- Parameters:
type
- Type to register forargumentType
- The argument type to register- See Also:
-
getArgumentType
@NotNull public @NotNull com.mojang.brigadier.arguments.ArgumentType<?> getArgumentType(@NotNull @NotNull CommandParameter parameter) Description copied from interface:BukkitBrigadier
Returns the argument type corresponding to the given parameter. If no resolver is able to handle this parameter,StringArgumentType.greedyString()
will be returned.- Specified by:
getArgumentType
in interfaceBukkitBrigadier
- Parameters:
parameter
- Parameter to got for- Returns:
- The argument type
-
wrapSource
Description copied from interface:BukkitBrigadier
Wraps Brigadier's command sender with the platform's appropriateCommandActor
- Specified by:
wrapSource
in interfaceBukkitBrigadier
- Parameters:
commandSource
- Source to wrap- Returns:
- The wrapped command source
-
register
public void register()Description copied from interface:BukkitBrigadier
Registers the command handler's brigadier- Specified by:
register
in interfaceBukkitBrigadier
-