Class LocationArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,org.bukkit.Location>
cloud.commandframework.bukkit.parsers.location.LocationArgument<C>
- Type Parameters:
C
- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<org.bukkit.Location>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class LocationArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,org.bukkit.Location>
Argument parser that parses
Location
from three doubles. This will use the command
senders world when it exists, or else it'll use the first loaded Bukkit world- Since:
- 1.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull LocationArgument.Builder<C>
newBuilder
(@NonNull String name) Create a new argument builderstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
org.bukkit.Location> Create a new required argumentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,
org.bukkit.Location> 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
-
newBuilder
Create a new argument builder- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Builder instance
-
of
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.Location> 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,org.bukkit.Location> optional(@NonNull String name) Create a new optional argument- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument name- Returns:
- Constructed argument
-