Package dev.jorel.commandapi.arguments
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,AdventureChatColorArgument,AngleArgument,AxisArgument,BiomeArgument,BiomeArgument.NamespacedKey,BooleanArgument,ChatColorArgument,DoubleArgument,EnchantmentArgument,EntityTypeArgument,FloatArgument,FloatRangeArgument,FunctionArgument,GreedyStringArgument,IntegerArgument,IntegerRangeArgument,ItemStackArgument,Location2DArgument,LocationArgument,LongArgument,LootTableArgument,MathOperationArgument,NamespacedKeyArgument,NBTCompoundArgument,ObjectiveArgument,OfflinePlayerArgument,ParticleArgument,PlayerArgument,PotionEffectArgument,PotionEffectArgument.NamespacedKey,RecipeArgument,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
ConstructorsModifierConstructorDescriptionprotectedSafeOverrideableArgument(String nodeName, com.mojang.brigadier.arguments.ArgumentType<?> rawType, Function<S, String> mapper) Instantiates this argument and assigns the mapper to the provided mapper -
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 dev.jorel.commandapi.arguments.AbstractArgument
combineWith, copyPermissionsAndRequirements, getArgumentPermission, getArgumentType, getCombinedArguments, getEntityNames, getHelpString, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getPrimitiveType, getRawType, getRequirements, hasCombinedArguments, includeSuggestions, isListed, isOptional, parseArgument, replaceSuggestions, setListed, setOptional, toString, withPermission, withPermission, withRequirementMethods inherited from class dev.jorel.commandapi.AbstractArgumentTree
thenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.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, executesRemoteConsoleMethods inherited from interface dev.jorel.commandapi.ChainableBuilder
instanceMethods inherited from interface dev.jorel.commandapi.PlatformExecutable
getExecutorMethods inherited from interface dev.jorel.commandapi.arguments.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, 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
-