Class ServerParser<C>
java.lang.Object
org.incendo.cloud.velocity.parser.ServerParser<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
ArgumentParser<C,,com.velocitypowered.api.proxy.server.RegisteredServer> BlockingSuggestionProvider<C>,BlockingSuggestionProvider.Strings<C>,SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class ServerParser<C>
extends Object
implements ArgumentParser<C,com.velocitypowered.api.proxy.server.RegisteredServer>, BlockingSuggestionProvider.Strings<C>
Argument parser for
servers- 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 com.velocitypowered.api.proxy.server.RegisteredServer> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) static <C> @NonNull CommandComponent.Builder<C, com.velocitypowered.api.proxy.server.RegisteredServer> Returns aCommandComponent.BuilderusingserverParser()as the parser.static <C> @NonNull ParserDescriptor<C, com.velocitypowered.api.proxy.server.RegisteredServer> Creates a new server 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
-
ServerParser
public ServerParser()
-
-
Method Details
-
serverParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,com.velocitypowered.api.proxy.server.RegisteredServer> serverParser()Creates a new server parser.- Type Parameters:
C- command sender type- Returns:
- the created parser
- Since:
- 2.0.0
-
serverComponent
@API(status=STABLE, since="2.0.0") public static <C> @NonNull CommandComponent.Builder<C,com.velocitypowered.api.proxy.server.RegisteredServer> serverComponent()Returns aCommandComponent.BuilderusingserverParser()as the parser.- Type Parameters:
C- the command sender type- Returns:
- the component builder
- Since:
- 2.0.0
-
parse
public @NonNull ArgumentParseResult<@NonNull com.velocitypowered.api.proxy.server.RegisteredServer> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,com.velocitypowered.api.proxy.server.RegisteredServer>
-
stringSuggestions
public @NonNull Iterable<@NonNull String> stringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) - Specified by:
stringSuggestionsin interfaceBlockingSuggestionProvider.Strings<C>
-