Class AbstractRegistryArgument<T extends Keyed>
java.lang.Object
com.thevoxelbox.voxelsniper.command.argument.AbstractRegistryArgument<T>
- All Implemented Interfaces:
VoxelCommandElement
- Direct Known Subclasses:
BiomeTypeArgument
,BlockTypeArgument
,EntityTypeArgument
public abstract class AbstractRegistryArgument<T extends Keyed>
extends Object
implements VoxelCommandElement
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final VoxelSniperPlugin
protected final NamespacedRegistry
<T> -
Constructor Summary
ConstructorDescriptionAbstractRegistryArgument
(VoxelSniperPlugin plugin, NamespacedRegistry<T> registry, String parseExceptionCaptionKey) Create an abstract pattern argument. -
Method Summary
Modifier and TypeMethodDescriptionprotected T
parseValue
(cloud.commandframework.context.CommandContext<SniperCommander> commandContext, Queue<String> inputQueue) suggestValues
(cloud.commandframework.context.CommandContext<SniperCommander> commandContext, String input)
-
Field Details
-
plugin
-
registry
-
parseExceptionCaptionKey
-
-
Constructor Details
-
AbstractRegistryArgument
public AbstractRegistryArgument(VoxelSniperPlugin plugin, NamespacedRegistry<T> registry, String parseExceptionCaptionKey) Create an abstract pattern argument.- Parameters:
plugin
- the pluginregistry
- the registryparseExceptionCaptionKey
- the parse exception caption key- Since:
- 3.0.0
-
-
Method Details
-
suggestValues
protected List<String> suggestValues(cloud.commandframework.context.CommandContext<SniperCommander> commandContext, String input) -
parseValue
protected T parseValue(cloud.commandframework.context.CommandContext<SniperCommander> commandContext, Queue<String> inputQueue)
-