Package org.incendo.cloud.bukkit.parser
Class MaterialParser<C>
java.lang.Object
org.incendo.cloud.bukkit.parser.MaterialParser<C>
- All Implemented Interfaces:
ArgumentParser<C,,Material> BlockingSuggestionProvider<C>,SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class MaterialParser<C>
extends Object
implements ArgumentParser<C,Material>, BlockingSuggestionProvider<C>
-
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 TypeMethodDescriptionstatic <C> @NonNull CommandComponent.Builder<C, Material> Returns aCommandComponent.BuilderusingmaterialParser()as the parser.static <C> @NonNull ParserDescriptor<C, Material> Creates a new material parser.parse(@NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput) suggestions(@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
suggestionsFuture
-
Constructor Details
-
MaterialParser
public MaterialParser()
-
-
Method Details
-
materialParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,Material> materialParser()Creates a new material parser.- Type Parameters:
C- command sender type- Returns:
- the created parser
- Since:
- 2.0.0
-
materialComponent
@API(status=STABLE, since="2.0.0") public static <C> @NonNull CommandComponent.Builder<C,Material> materialComponent()Returns aCommandComponent.BuilderusingmaterialParser()as the parser.- Type Parameters:
C- the command sender type- Returns:
- the component builder
- Since:
- 2.0.0
-
parse
public @NonNull ArgumentParseResult<Material> parse(@NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,Material>
-
suggestions
public @NonNull Iterable<@NonNull Suggestion> suggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) - Specified by:
suggestionsin interfaceBlockingSuggestionProvider<C>
-