Class NamespacedKeyArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,org.bukkit.NamespacedKey>
cloud.commandframework.bukkit.argument.NamespacedKeyArgument<C>
- Type Parameters:
C- sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<org.bukkit.NamespacedKey>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public final class NamespacedKeyArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,org.bukkit.NamespacedKey>
cloud argument type that parses
NamespacedKeys- Since:
- 1.7.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forNamespacedKeyArgument.static final classException used whenNamespacedKeyArgument.Parserfails.static final classParser forNamespacedKey. -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull NamespacedKeyArgument.Builder<C>Create a newNamespacedKeyArgument.Builder.static <C> @NonNull NamespacedKeyArgument<C>Create a new requiredNamespacedKeyArgument.static <C> @NonNull NamespacedKeyArgument<C>Create a new optionalNamespacedKeyArgument.static <C> @NonNull NamespacedKeyArgument<C>Create a new optionalNamespacedKeyArgumentusing the provided default value.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 newNamespacedKeyArgument.Builder.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- builder instance
- Since:
- 1.7.0
-
of
Create a new requiredNamespacedKeyArgument.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- argument instance
- Since:
- 1.7.0
-
optional
Create a new optionalNamespacedKeyArgument.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- argument instance
- Since:
- 1.7.0
-
optional
public static <C> @NonNull NamespacedKeyArgument<C> optional(@NonNull String name, @NonNull org.bukkit.NamespacedKey defulatValue) Create a new optionalNamespacedKeyArgumentusing the provided default value.- Type Parameters:
C- sender type- Parameters:
name- argument namedefulatValue- default name- Returns:
- argument instance
- Since:
- 1.7.0
-