Class MaterialOrHandArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,MaterialOrHand>
rocks.gravili.notquests.paper.commands.arguments.ItemStackSelectionArgument<C>
- Type Parameters:
C
- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<MaterialOrHand>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public class MaterialOrHandArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,MaterialOrHand>
cloud argument type that parses Bukkit
materials
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
-
Constructor Summary
ModifierConstructorDescriptionprotected
MaterialOrHandArgument
(boolean required, @NonNull String name, @NonNull String defaultValue, @Nullable BiFunction<@NonNull cloud.commandframework.context.CommandContext<C>, @NonNull String, @NonNull List<@NonNull String>> suggestionsProvider, @NonNull cloud.commandframework.ArgumentDescription defaultDescription, NotQuests main) -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull MaterialOrHandArgument.Builder<C>
newBuilder
(@NonNull String name, NotQuests main) Create a new builderstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
MaterialOrHand> Create a new required argumentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
MaterialOrHand> optional
(@NonNull String name, @NonNull MaterialOrHand material, NotQuests main) Create a new optional argument with a default valuestatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
MaterialOrHand> Create a new optional argumentMethods 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
-
Constructor Details
-
MaterialOrHandArgument
protected MaterialOrHandArgument(boolean required, @NonNull String name, @NonNull String defaultValue, @Nullable BiFunction<@NonNull cloud.commandframework.context.CommandContext<C>, @NonNull String, @NonNull List<@NonNull String>> suggestionsProvider, @NonNull cloud.commandframework.ArgumentDescription defaultDescription, NotQuests main)
-
-
Method Details
-
newBuilder
public static <C> @NonNull MaterialOrHandArgument.Builder<C> newBuilder(@NonNull String name, NotQuests main) Create a new builder- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
-
of
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,MaterialOrHand> of(@NonNull String name, NotQuests main) Create a new required argument- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,MaterialOrHand> optional(@NonNull String name, NotQuests main) Create a new optional argument- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,MaterialOrHand> optional(@NonNull String name, @NonNull MaterialOrHand material, NotQuests main) Create a new optional argument with a default value- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namematerial
- Default value- Returns:
- Created argument
-