Package org.incendo.cloud.bungee.parser
Class ServerParser<C>
java.lang.Object
org.incendo.cloud.bungee.parser.ServerParser<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
ArgumentParser<C,,net.md_5.bungee.api.config.ServerInfo> SuggestionProviderHolder<C>
public final class ServerParser<C>
extends Object
implements ArgumentParser<C,net.md_5.bungee.api.config.ServerInfo>
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> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull ArgumentParseResult<@NonNull net.md_5.bungee.api.config.ServerInfo> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) static <C> @NonNull CommandComponent.Builder<C, net.md_5.bungee.api.config.ServerInfo> Returns aCommandComponent.BuilderusingserverParser()as the parser.static <C> @NonNull ParserDescriptor<C, net.md_5.bungee.api.config.ServerInfo> Creates a new server parser.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, suggestionProvider
-
Constructor Details
-
ServerParser
public ServerParser()
-
-
Method Details
-
serverParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,net.md_5.bungee.api.config.ServerInfo> 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,net.md_5.bungee.api.config.ServerInfo> 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 net.md_5.bungee.api.config.ServerInfo> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,net.md_5.bungee.api.config.ServerInfo>
-