Class NamespacedKeyArgument
java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Argument<org.bukkit.NamespacedKey>, Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<org.bukkit.NamespacedKey, Argument<org.bukkit.NamespacedKey>, Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.Argument<org.bukkit.NamespacedKey>
dev.jorel.commandapi.arguments.SafeOverrideableArgument<org.bukkit.NamespacedKey, org.bukkit.NamespacedKey>
dev.jorel.commandapi.arguments.NamespacedKeyArgument
- All Implemented Interfaces:
SafeOverrideable<org.bukkit.NamespacedKey, org.bukkit.NamespacedKey, Argument<org.bukkit.NamespacedKey>, Argument<?>, org.bukkit.command.CommandSender>, BukkitExecutable<Argument<org.bukkit.NamespacedKey>>, ChainableBuilder<Argument<org.bukkit.NamespacedKey>>, PlatformExecutable<Argument<org.bukkit.NamespacedKey>, org.bukkit.command.CommandSender>
public class NamespacedKeyArgument
extends SafeOverrideableArgument<org.bukkit.NamespacedKey, org.bukkit.NamespacedKey>
An argument that represents a Minecraft resource location (or namespaced key)
in the form namespace:key. The namespace and path can contain characters
0-9, a-z, _ (underscore), - (hyphen),
. (dot). The key can also contain / (forward slash)- Since:
- 8.4.0
- API Note:
- Returns a
NamespacedKeyobject
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> -
Constructor Summary
ConstructorsConstructorDescriptionNamespacedKeyArgument(String nodeName) Constructs a MinecraftKeyArgument with a given node name. -
Method Summary
Modifier and TypeMethodDescriptionArgument<org.bukkit.NamespacedKey> CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> Class<org.bukkit.NamespacedKey> <CommandSourceStack>
org.bukkit.NamespacedKeyparseArgument(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<org.bukkit.NamespacedKey> executes(CommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executes(CommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executes(ResultingCommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executes(ResultingCommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesConsole(ConsoleCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesEntity(EntityCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesEntity(EntityResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesNative(NativeCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesNative(NativeResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesPlayer(PlayerCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesPlayer(PlayerResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesProxy(ProxyCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> executesProxy(ProxyResultingCommandExecutor executor) Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> Adds an executor to the current command builderdefault Argument<org.bukkit.NamespacedKey> 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
-
NamespacedKeyArgument
Constructs a MinecraftKeyArgument with a given node name.- Parameters:
nodeName- the name of the node for argument
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classAbstractArgument<org.bukkit.NamespacedKey, Argument<org.bukkit.NamespacedKey>, Argument<?>, org.bukkit.command.CommandSender>
-
getArgumentType
- Specified by:
getArgumentTypein classAbstractArgument<org.bukkit.NamespacedKey, Argument<org.bukkit.NamespacedKey>, Argument<?>, org.bukkit.command.CommandSender>
-
parseArgument
public <CommandSourceStack> org.bukkit.NamespacedKey parseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, CommandArguments previousArgs) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parseArgumentin classAbstractArgument<org.bukkit.NamespacedKey, Argument<org.bukkit.NamespacedKey>, 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
-