Class ItemStackArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,ProtoItemStack>
cloud.commandframework.bukkit.parsers.ItemStackArgument<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<ProtoItemStack>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public final class ItemStackArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,ProtoItemStack>
Argument type for parsing a
Material and optional extra NBT data into a ProtoItemStack.
This argument type only provides basic suggestions by default. On Minecraft 1.13 and newer, enabling Brigadier
compatibility through BukkitCommandManager.registerBrigadier() will allow client side validation and
suggestions to be utilized.
- Since:
- 1.5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forItemStackArgument.static final classParser forProtoItemStack. -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull ItemStackArgument.Builder<C>Create a newItemStackArgument.Builder.static <C> @NonNull ItemStackArgument<C>Create a new requiredItemStackArgument.static <C> @NonNull ItemStackArgument<C>Create a new optionalItemStackArgument.Methods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
Method Details
-
builder
Create a newItemStackArgument.Builder.- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredItemStackArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalItemStackArgument.- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
- Since:
- 1.5.0
-