Class PlayerParser<C>
java.lang.Object
com.xpdustry.distributor.api.command.cloud.parser.PlayerParser<C>
- Type Parameters:
C- the command sender type
- All Implemented Interfaces:
org.incendo.cloud.parser.ArgumentParser<C,,mindustry.gen.Player> org.incendo.cloud.suggestion.SuggestionProviderHolder<C>
public final class PlayerParser<C>
extends Object
implements org.incendo.cloud.parser.ArgumentParser<C,mindustry.gen.Player>
A parser for
Player arguments.
Uses Distributor.getPlayerLookup() to find players.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn exception thrown when a parsing error occurs while searching for a player. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.incendo.cloud.parser.ArgumentParseResult<mindustry.gen.Player>parse(org.incendo.cloud.context.CommandContext<C> ctx, org.incendo.cloud.context.CommandInput input) CompletableFuture<org.incendo.cloud.parser.ArgumentParseResult<mindustry.gen.Player>>parseFuture(org.incendo.cloud.context.CommandContext<C> ctx, org.incendo.cloud.context.CommandInput input) static <C> org.incendo.cloud.component.CommandComponent.Builder<C,mindustry.gen.Player> static <C> org.incendo.cloud.parser.ParserDescriptor<C,mindustry.gen.Player> org.incendo.cloud.suggestion.SuggestionProvider<C>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
-
Constructor Details
-
PlayerParser
public PlayerParser()
-
-
Method Details
-
playerParser
public static <C> org.incendo.cloud.parser.ParserDescriptor<C,mindustry.gen.Player> playerParser() -
playerComponent
public static <C> org.incendo.cloud.component.CommandComponent.Builder<C,mindustry.gen.Player> playerComponent() -
parse
public org.incendo.cloud.parser.ArgumentParseResult<mindustry.gen.Player> parse(org.incendo.cloud.context.CommandContext<C> ctx, org.incendo.cloud.context.CommandInput input) - Specified by:
parsein interfaceorg.incendo.cloud.parser.ArgumentParser<C,mindustry.gen.Player>
-
parseFuture
public CompletableFuture<org.incendo.cloud.parser.ArgumentParseResult<mindustry.gen.Player>> parseFuture(org.incendo.cloud.context.CommandContext<C> ctx, org.incendo.cloud.context.CommandInput input) - Specified by:
parseFuturein interfaceorg.incendo.cloud.parser.ArgumentParser<C,mindustry.gen.Player>
-
suggestionProvider
-