Class SafeOverrideableArgument<T,S>
java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Argument<T>, Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<T, Argument<T>, Argument<?>, org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.Argument<T>
dev.jorel.commandapi.arguments.SafeOverrideableArgument<T,S>
- Type Parameters:
T- The type of the underlying object that this argument casts toS- A custom type which is represented by this argument. For example, aStringArgumentwill have a custom typeString
- All Implemented Interfaces:
SafeOverrideable<T, S, Argument<T>, Argument<?>, org.bukkit.command.CommandSender>, BukkitExecutable<Argument<T>>, ChainableBuilder<Argument<T>>, PlatformExecutable<Argument<T>, org.bukkit.command.CommandSender>
- Direct Known Subclasses:
AdvancementArgument, AngleArgument, AxisArgument, BiomeArgument, BiomeArgument.NamespacedKey, BooleanArgument, DoubleArgument, DoubleRangeArgument, EnchantmentArgument, EntityTypeArgument, FloatArgument, FunctionArgument, GreedyStringArgument, IntegerArgument, IntegerRangeArgument, ItemStackArgument, Location2DArgument, LocationArgument, LongArgument, LootTableArgument, MathOperationArgument, NamespacedKeyArgument, NBTCompoundArgument, ObjectiveArgument, ParticleArgument, PotionEffectArgument, PotionEffectArgument.NamespacedKey, RotationArgument, ScoreboardSlotArgument, SoundArgument, SoundArgument.NamespacedKey, TeamArgument, TimeArgument, UUIDArgument, WorldArgument
public abstract class SafeOverrideableArgument<T,S>
extends Argument<T>
implements SafeOverrideable<T, S, Argument<T>, Argument<?>, org.bukkit.command.CommandSender>
An interface declaring methods required to override argument suggestions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionComposes aSto aNamespacedKeymapping function to convertSto aStringCommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> voidsetExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) Methods inherited from class AbstractArgument
combineWith, copyPermissionsAndRequirements, getArgumentPermission, getArgumentType, getCombinedArguments, getEntityNames, getHelpString, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getPrimitiveType, getRawType, getRawTypeSupplier, getRequirements, hasCombinedArguments, includeSuggestions, isListed, isOptional, parseArgument, 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 TypeMethodDescriptionexecutes(CommandExecutionInfo executor, ExecutorType... types) Adds an executor to the current command builderexecutes(CommandExecutor executor, ExecutorType... types) Adds an executor to the current command builderexecutes(ResultingCommandExecutionInfo 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 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 builderAdds an executor to the current command builderAdds an executor to the current command builderexecutesEntity(EntityCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesEntity(EntityResultingCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderexecutesNative(NativeCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesNative(NativeResultingCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesPlayer(PlayerCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesPlayer(PlayerResultingCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesProxy(ProxyCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderexecutesProxy(ProxyResultingCommandExecutor executor) Adds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderAdds an executor to the current command builderAdds 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
-
SafeOverrideableArgument
protected SafeOverrideableArgument(String nodeName, Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> rawType, Function<S, String> mapper) Instantiates this argument and assigns the mapper to the provided mapper- Parameters:
nodeName- the node name of this argumentrawType- the NMS raw argument type of this argumentmapper- the mapping function that maps this argument type to a string for suggestions
-
-
Method Details
-
getMapper
-
fromKey
-
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
-