Class ContentParser<C,T extends mindustry.ctype.MappableContent>
java.lang.Object
com.xpdustry.distributor.api.command.cloud.parser.ContentParser<C,T>
- Type Parameters:
C- the command sender typeT- the content type
- All Implemented Interfaces:
org.incendo.cloud.parser.ArgumentParser<C,,T> org.incendo.cloud.suggestion.SuggestionProviderHolder<C>
public final class ContentParser<C,T extends mindustry.ctype.MappableContent>
extends Object
implements org.incendo.cloud.parser.ArgumentParser<C,T>
A parser for
content arguments.
Will only succeed on exact matches.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn exception thrown when a content argument could not be parsed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <C,T extends mindustry.ctype.MappableContent>
org.incendo.cloud.component.CommandComponent.Builder<C,T> contentComponent(com.xpdustry.distributor.api.key.CTypeKey<T> contentType) static <C,T extends mindustry.ctype.MappableContent>
org.incendo.cloud.parser.ParserDescriptor<C,T> contentParser(com.xpdustry.distributor.api.key.CTypeKey<T> contentType) org.incendo.cloud.parser.ArgumentParseResult<T>parse(org.incendo.cloud.context.CommandContext<C> ctx, org.incendo.cloud.context.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, suggestionProvider
-
Constructor Details
-
ContentParser
-
-
Method Details
-
contentParser
public static <C,T extends mindustry.ctype.MappableContent> org.incendo.cloud.parser.ParserDescriptor<C,T> contentParser(com.xpdustry.distributor.api.key.CTypeKey<T> contentType) -
contentComponent
public static <C,T extends mindustry.ctype.MappableContent> org.incendo.cloud.component.CommandComponent.Builder<C,T> contentComponent(com.xpdustry.distributor.api.key.CTypeKey<T> contentType) -
parse
-