Class Location2DArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Location2D>
cloud.commandframework.bukkit.parsers.location.Location2DArgument<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<Location2D>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public final class Location2DArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,Location2D>
Argument parser that parses
Location2D from two doubles. This will use the command
senders world when it exists, or else it'll use the first loaded Bukkit world- Since:
- 1.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull Location2DArgument.Builder<C>Create a newLocation2DArgument.Builder.static <C> @NonNull Location2DArgument.Builder<C>newBuilder(@NonNull String name) Deprecated.static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Location2D> Create a new required argumentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Location2D> 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
-
Method Details
-
builder
@API(status=STABLE, since="1.8.0") public static <C> @NonNull Location2DArgument.Builder<C> builder(@NonNull String name) Create a newLocation2DArgument.Builder.- Type Parameters:
C- sender type- Parameters:
name- argument name- Returns:
- new
Location2DArgument.Builder - Since:
- 1.8.0
-
newBuilder
@API(status=DEPRECATED, since="1.8.0") @Deprecated public static <C> @NonNull Location2DArgument.Builder<C> newBuilder(@NonNull String name) Deprecated.preferbuilder(String)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,Location2D> of(@NonNull String name) Create a new required argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Constructed argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,Location2D> optional(@NonNull String name) Create a new optional argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Constructed argument
-
builder(String)