Package dev.jorel.commandapi.arguments
Class BiomeArgument
java.lang.Object
dev.jorel.commandapi.ArgumentTree
dev.jorel.commandapi.arguments.Argument<T>
dev.jorel.commandapi.arguments.SafeOverrideableArgument<org.bukkit.block.Biome,org.bukkit.block.Biome>
dev.jorel.commandapi.arguments.BiomeArgument
- All Implemented Interfaces:
ICustomProvidedArgument
public class BiomeArgument
extends SafeOverrideableArgument<org.bukkit.block.Biome,org.bukkit.block.Biome>
implements ICustomProvidedArgument
An argument that represents the Bukkit Biome object
- API Note:
- Returns a
Biomeobject
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CustomCommandExecutor<?>The CustomCommandExecutor for this executable implementation -
Constructor Summary
ConstructorsConstructorDescriptionBiomeArgument(String nodeName) Constructs a BiomeArgument with a given node name. -
Method Summary
Modifier and TypeMethodDescriptionClear all executors from the current command builderexecutes(CommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderexecutes(ResultingCommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderexecutesConsole(ConsoleCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesEntity(EntityCommandExecutor executor) Adds an executor to the current command builderexecutesEntity(EntityResultingCommandExecutor executor) Adds an executor to the current command builderexecutesNative(NativeCommandExecutor executor) Adds an executor to the current command builderexecutesNative(NativeResultingCommandExecutor executor) Adds an executor to the current command builderexecutesPlayer(PlayerCommandExecutor executor) Adds an executor to the current command builderexecutesPlayer(PlayerResultingCommandExecutor executor) Adds an executor to the current command builderexecutesProxy(ProxyCommandExecutor executor) Adds an executor to the current command builderexecutesProxy(ProxyResultingCommandExecutor executor) Adds an executor to the current command builderReturns the argument type for this argument.CustomCommandExecutor<? extends org.bukkit.command.CommandSender>Returns the executors that this command hasClass<org.bukkit.block.Biome>Returns the primitive type of the current Argument.Returns the suggestion provider that this argument is populated with<CommandListenerWrapper>
org.bukkit.block.BiomeparseArgument(NMS<CommandListenerWrapper> nms, com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key, Object[] previousArgs) Parses an argument, returning the specific Bukkit object that the argument represents.voidsetExecutor(CustomCommandExecutor<? extends org.bukkit.command.CommandSender> executor) Sets the executors for this commandMethods inherited from class dev.jorel.commandapi.arguments.SafeOverrideableArgument
includeSafeSuggestions, includeWithSafeSuggestions, includeWithSafeSuggestionsT, replaceSafeSuggestions, replaceWithSafeSuggestions, replaceWithSafeSuggestionsTMethods inherited from class dev.jorel.commandapi.arguments.Argument
getArgumentPermission, getEntityNames, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getRawType, getRequirements, includeSuggestions, includeSuggestions, includeSuggestionsT, isListed, replaceSuggestions, replaceSuggestions, replaceSuggestionsT, setListed, withPermission, withPermission, withRequirementMethods inherited from class dev.jorel.commandapi.ArgumentTree
then
-
Field Details
-
executor
The CustomCommandExecutor for this executable implementation
-
-
Constructor Details
-
BiomeArgument
Constructs a BiomeArgument with a given node name.- Parameters:
nodeName- the name of the node for argument
-
-
Method Details
-
getPrimitiveType
Description copied from class:ArgumentReturns the primitive type of the current Argument. After executing a command, this argument should yield an object of this returned class.- Specified by:
getPrimitiveTypein classArgument<org.bukkit.block.Biome>- Returns:
- the type that this argument yields when the command is run
-
getArgumentType
Description copied from class:ArgumentReturns the argument type for this argument.- Specified by:
getArgumentTypein classArgument<org.bukkit.block.Biome>- Returns:
- the argument type for this argument
-
getSuggestionProvider
Description copied from interface:ICustomProvidedArgumentReturns the suggestion provider that this argument is populated with- Specified by:
getSuggestionProviderin interfaceICustomProvidedArgument- Returns:
- the suggestion provider that this argument is populated with
-
parseArgument
public <CommandListenerWrapper> org.bukkit.block.Biome parseArgument(NMS<CommandListenerWrapper> nms, com.mojang.brigadier.context.CommandContext<CommandListenerWrapper> cmdCtx, String key, Object[] previousArgs) throws com.mojang.brigadier.exceptions.CommandSyntaxException Description copied from class:ArgumentParses an argument, returning the specific Bukkit object that the argument represents. This is intended for use by the internals of the CommandAPI and isn't expected to be used outside the CommandAPI- Specified by:
parseArgumentin classArgument<org.bukkit.block.Biome>- Type Parameters:
CommandListenerWrapper- the command source type- Parameters:
nms- an instance of NMScmdCtx- the context which ran this commandkey- the name of the argument nodepreviousArgs- an array of previously declared arguments- Returns:
- the parsed object represented by this argument
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- if parsing fails
-
executes
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(CommandSender, Object[]) -> ()that will be executed when the command is runtypes- A list of executor types to use this executes method for.- Returns:
- this command builder
-
executes
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(CommandSender, Object[]) -> intthat will be executed when the command is runtypes- A list of executor types to use this executes method for.- Returns:
- this command builder
-
executesPlayer
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(Player, Object[]) -> ()that will be executed when the command is run- Returns:
- this command builder
-
executesPlayer
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(Player, Object[]) -> intthat will be executed when the command is run- Returns:
- this command builder
-
executesEntity
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(Entity, Object[]) -> ()that will be executed when the command is run- Returns:
- this command builder
-
executesEntity
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(Entity, Object[]) -> intthat will be executed when the command is run- Returns:
- this command builder
-
executesProxy
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(Entity, Object[]) -> ()that will be executed when the command is run- Returns:
- this command builder
-
executesProxy
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(Entity, Object[]) -> intthat will be executed when the command is run- Returns:
- this command builder
-
executesCommandBlock
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(BlockCommandSender, Object[]) -> ()that will be executed when the command is run- Returns:
- this command builder
-
executesCommandBlock
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(BlockCommandSender, Object[]) -> intthat will be executed when the command is run- Returns:
- this command builder
-
executesConsole
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(BlockCommandSender, Object[]) -> ()that will be executed when the command is run- Returns:
- this command builder
-
executesConsole
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(BlockCommandSender, Object[]) -> intthat will be executed when the command is run- Returns:
- this command builder
-
executesNative
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(NativeCommandExecutor, Object[]) -> ()that will be executed when the command is run- Returns:
- this command builder
-
executesNative
Adds an executor to the current command builder- Parameters:
executor- A lambda of type(NativeCommandExecutor, Object[]) -> intthat will be executed when the command is run- Returns:
- this command builder
-
getExecutor
Returns the executors that this command has- Returns:
- the executors that this command has
-
setExecutor
Sets the executors for this command- Parameters:
executor- the executors for this command
-
clearExecutors
Clear all executors from the current command builder- Returns:
- this command builder
-