Class Location2DArgument
java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Argument<Location2D>, Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<Location2D, Argument<Location2D>, Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.Argument<Location2D>
dev.jorel.commandapi.arguments.SafeOverrideableArgument<Location2D, Location2D>
dev.jorel.commandapi.arguments.Location2DArgument
- All Implemented Interfaces:
SafeOverrideable<Location2D, Location2D, Argument<Location2D>, Argument<?>, org.bukkit.command.CommandSender>, BukkitExecutable<Argument<Location2D>>, ChainableBuilder<Argument<Location2D>>, PlatformExecutable<Argument<Location2D>, org.bukkit.command.CommandSender>
An argument that represents the Bukkit
Location object in x and z directions- Since:
- 3.0
- API Note:
- Returns a
Location2Dobject
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> -
Constructor Summary
ConstructorsConstructorDescriptionLocation2DArgument(String nodeName) A Location argument.Location2DArgument(String nodeName, LocationType type) A Location argument.Location2DArgument(String nodeName, LocationType type, boolean centerPosition) A Location argument. -
Method Summary
Modifier and TypeMethodDescriptionCommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> Returns whether this argument isLocationType.BLOCK_POSITIONorLocationType.PRECISE_POSITION<CommandSourceStack>
Location2DparseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, CommandArguments previousArgs) voidsetExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) Methods inherited from class SafeOverrideableArgument
fromKey, getMapperMethods inherited from class AbstractArgument
combineWith, copyPermissionsAndRequirements, getArgumentPermission, getCombinedArguments, getEntityNames, getHelpString, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getRawType, getRawTypeSupplier, getRequirements, hasCombinedArguments, includeSuggestions, isListed, isOptional, replaceSuggestions, setListed, setOptional, toString, withPermission, withPermission, withRequirementMethods inherited from class AbstractArgumentTree
then, thenNested, thenNestedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BukkitExecutable
executes, executes, executes, executes, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesConsole, executesConsole, executesConsole, executesConsole, executesEntity, executesEntity, executesEntity, executesEntity, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesNative, executesNative, executesNative, executesNative, executesPlayer, executesPlayer, executesPlayer, executesPlayer, executesProxy, executesProxy, executesProxy, executesProxy, executesRemoteConsole, executesRemoteConsole, executesRemoteConsole, executesRemoteConsoleModifier and TypeMethodDescriptiondefault Argument<Location2D> executes(CommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<Location2D> executes(CommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<Location2D> executes(ResultingCommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<Location2D> executes(ResultingCommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesConsole(ConsoleCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesEntity(EntityCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesEntity(EntityResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesNative(NativeCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesNative(NativeResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesPlayer(PlayerCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesPlayer(PlayerResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesProxy(ProxyCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> executesProxy(ProxyResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderdefault Argument<Location2D> Adds an executor to the current command builderMethods inherited from interface PlatformExecutable
getExecutorMethods inherited from interface SafeOverrideable
includeSafeSuggestions, includeSuggestions, replaceSafeSuggestions, replaceSuggestions
-
Field Details
-
executor
protected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> executor
-
-
Constructor Details
-
Location2DArgument
A Location argument. Represents Minecraft locations in 2D space. Defaults toLocationType.PRECISE_POSITION- Parameters:
nodeName- the name of the node for this argument
-
Location2DArgument
A Location argument. Represents Minecraft locations in 2D space- Parameters:
nodeName- the name of the node for this argumenttype- the location type of this location, eitherLocationType.BLOCK_POSITIONorLocationType.PRECISE_POSITION
-
Location2DArgument
A Location argument. Represents Minecraft locations in 2D space- Parameters:
nodeName- the name of the node for this argumenttype- the location type of this location, eitherLocationType.BLOCK_POSITIONorLocationType.PRECISE_POSITIONcenterPosition- whether LocationType.PRECISE_POSITION should center the position of the location within a block
-
-
Method Details
-
getLocationType
Returns whether this argument isLocationType.BLOCK_POSITIONorLocationType.PRECISE_POSITION- Returns:
- the location type of this argument
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classAbstractArgument<Location2D, Argument<Location2D>, Argument<?>, org.bukkit.command.CommandSender>
-
getArgumentType
- Specified by:
getArgumentTypein classAbstractArgument<Location2D, Argument<Location2D>, Argument<?>, org.bukkit.command.CommandSender>
-
parseArgument
public <CommandSourceStack> Location2D parseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, CommandArguments previousArgs) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parseArgumentin classAbstractArgument<Location2D, Argument<Location2D>, Argument<?>, org.bukkit.command.CommandSender>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExecutor
public CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> getExecutor() -
setExecutor
public void setExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) -
clearExecutors
-