Package net.forthecrown.grenadier.types
Interface EntityArgument
- All Superinterfaces:
ArgumentType<EntitySelector>
Parses an entity selector
Input examples:
PlayerName 21290ce5-679c-4917-b30e-168c0d450c72 @e[type=minecraft:spider,limit=1,distance=..10]
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets whether the resulting selector is allowed to select more than 1 entityboolean
Gets whether the resulting selector is allowed to include entities or is limited to just playerslistSuggestions
(CommandContext<S> context, SuggestionsBuilder builder) default EntitySelector
parse
(StringReader reader) parse
(StringReader reader, boolean overridePermissions) Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType
getExamples
-
Method Details
-
allowsMultiple
boolean allowsMultiple()Gets whether the resulting selector is allowed to select more than 1 entity- Returns:
true
, if this argument may select more than 1 entity,false
otherwise
-
includesEntities
boolean includesEntities()Gets whether the resulting selector is allowed to include entities or is limited to just players- Returns:
true
, if all entities not just players can be selected,false
otherwise
-
parse
- Specified by:
parse
in interfaceArgumentType<EntitySelector>
- Throws:
CommandSyntaxException
-
parse
EntitySelector parse(StringReader reader, boolean overridePermissions) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
listSuggestions
<S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestions
in interfaceArgumentType<EntitySelector>
-