Package org.incendo.cloud.bukkit.parser
Class PlayerParser<C>
java.lang.Object
org.incendo.cloud.bukkit.parser.PlayerParser<C>
- All Implemented Interfaces:
ArgumentParser<C,,Player> BlockingSuggestionProvider<C>,SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class PlayerParser<C>
extends Object
implements ArgumentParser<C,Player>, BlockingSuggestionProvider<C>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPlayer parse exceptionNested 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 TypeMethodDescriptionparse(@NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput) static <C> @NonNull CommandComponent.Builder<C, Player> Returns aCommandComponent.BuilderusingplayerParser()as the parser.static <C> @NonNull ParserDescriptor<C, Player> Creates a new player parser.suggestions(@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
suggestionsFuture
-
Constructor Details
-
PlayerParser
public PlayerParser()
-
-
Method Details
-
playerParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,Player> playerParser()Creates a new player parser.- Type Parameters:
C- command sender type- Returns:
- the created parser
- Since:
- 2.0.0
-
playerComponent
@API(status=STABLE, since="2.0.0") public static <C> @NonNull CommandComponent.Builder<C,Player> playerComponent()Returns aCommandComponent.BuilderusingplayerParser()as the parser.- Type Parameters:
C- the command sender type- Returns:
- the component builder
- Since:
- 2.0.0
-
parse
public @NonNull ArgumentParseResult<Player> parse(@NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,Player>
-
suggestions
public @NonNull Iterable<@NonNull Suggestion> suggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) - Specified by:
suggestionsin interfaceBlockingSuggestionProvider<C>
-