Class LocationParser<C>
java.lang.Object
org.incendo.cloud.bukkit.parser.location.LocationParser<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
ArgumentParser<C,,Location> BlockingSuggestionProvider<C>,BlockingSuggestionProvider.Strings<C>,SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class LocationParser<C>
extends Object
implements ArgumentParser<C,Location>, BlockingSuggestionProvider.Strings<C>
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 classes/interfaces inherited from interface org.incendo.cloud.parser.ArgumentParser
ArgumentParser.FutureArgumentParser<C,T> Nested classes/interfaces inherited from interface org.incendo.cloud.suggestion.BlockingSuggestionProvider
BlockingSuggestionProvider.Strings<C> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull CommandComponent.Builder<C, Location> Returns aCommandComponent.BuilderusinglocationParser()as the parser.static <C> @NonNull ParserDescriptor<C, Location> Creates a new location parser.parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) stringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.incendo.cloud.parser.ArgumentParser
flatMap, flatMapSuccess, mapSuccess, parseFuture, suggestionProviderMethods inherited from interface org.incendo.cloud.suggestion.BlockingSuggestionProvider
suggestionsFutureMethods inherited from interface org.incendo.cloud.suggestion.BlockingSuggestionProvider.Strings
suggestions
-
Constructor Details
-
LocationParser
public LocationParser()
-
-
Method Details
-
locationParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,Location> locationParser()Creates a new location parser.- Type Parameters:
C- command sender type- Returns:
- the created parser
- Since:
- 2.0.0
-
locationComponent
@API(status=STABLE, since="2.0.0") public static <C> @NonNull CommandComponent.Builder<C,Location> locationComponent()Returns aCommandComponent.BuilderusinglocationParser()as the parser.- Type Parameters:
C- the command sender type- Returns:
- the component builder
- Since:
- 2.0.0
-
parse
public @NonNull ArgumentParseResult<@NonNull Location> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,Location>
-
stringSuggestions
public @NonNull Iterable<@NonNull String> stringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) - Specified by:
stringSuggestionsin interfaceBlockingSuggestionProvider.Strings<C>
-