Package org.incendo.cloud.bungee.parser
Class PlayerParser<C>
java.lang.Object
org.incendo.cloud.bungee.parser.PlayerParser<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
ArgumentParser<C,,net.md_5.bungee.api.connection.ProxiedPlayer> BlockingSuggestionProvider<C>,BlockingSuggestionProvider.Strings<C>,SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class PlayerParser<C>
extends Object
implements ArgumentParser<C,net.md_5.bungee.api.connection.ProxiedPlayer>, BlockingSuggestionProvider.Strings<C>
Argument parser for
players- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesNested 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 TypeMethodDescription@NonNull ArgumentParseResult<@NonNull net.md_5.bungee.api.connection.ProxiedPlayer> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) static <C> @NonNull CommandComponent.Builder<C, net.md_5.bungee.api.connection.ProxiedPlayer> Returns aCommandComponent.BuilderusingplayerParser()as the parser.static <C> @NonNull ParserDescriptor<C, net.md_5.bungee.api.connection.ProxiedPlayer> Creates a new player parser.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
-
PlayerParser
public PlayerParser()
-
-
Method Details
-
playerParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,net.md_5.bungee.api.connection.ProxiedPlayer> 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,net.md_5.bungee.api.connection.ProxiedPlayer> 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<@NonNull net.md_5.bungee.api.connection.ProxiedPlayer> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,net.md_5.bungee.api.connection.ProxiedPlayer>
-
stringSuggestions
public @NonNull Iterable<@NonNull String> stringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) - Specified by:
stringSuggestionsin interfaceBlockingSuggestionProvider.Strings<C>
-