Package org.incendo.cloud.bukkit.parser
Class OfflinePlayerParser<C>
java.lang.Object
org.incendo.cloud.bukkit.parser.OfflinePlayerParser<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
ArgumentParser<C,,OfflinePlayer> BlockingSuggestionProvider<C>,BlockingSuggestionProvider.Strings<C>,SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class OfflinePlayerParser<C>
extends Object
implements ArgumentParser<C,OfflinePlayer>, BlockingSuggestionProvider.Strings<C>
Parser type that parses into
OfflinePlayer. This is not thread safe. This
may also result in a blocking request to get the UUID for the offline player.
Avoid using this type if possible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOfflinePlayer parse exceptionNested 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, OfflinePlayer> Returns aCommandComponent.BuilderusingofflinePlayerParser()as the parser.static <C> @NonNull ParserDescriptor<C, OfflinePlayer> Creates a new offline player parser.parse(@NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput) 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
-
OfflinePlayerParser
public OfflinePlayerParser()
-
-
Method Details
-
offlinePlayerParser
@API(status=STABLE, since="2.0.0") public static <C> @NonNull ParserDescriptor<C,OfflinePlayer> offlinePlayerParser()Creates a new offline player parser.- Type Parameters:
C- command sender type- Returns:
- the created parser
- Since:
- 2.0.0
-
offlinePlayerComponent
@API(status=STABLE, since="2.0.0") public static <C> @NonNull CommandComponent.Builder<C,OfflinePlayer> offlinePlayerComponent()Returns aCommandComponent.BuilderusingofflinePlayerParser()as the parser.- Type Parameters:
C- the command sender type- Returns:
- the component builder
- Since:
- 2.0.0
-
parse
public @NonNull ArgumentParseResult<OfflinePlayer> parse(@NonNull CommandContext<C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,OfflinePlayer>
-
stringSuggestions
public @NonNull Iterable<@NonNull String> stringSuggestions(@NonNull CommandContext<C> commandContext, @NonNull CommandInput input) - Specified by:
stringSuggestionsin interfaceBlockingSuggestionProvider.Strings<C>
-