Class ObjectiveArgument
java.lang.Object
net.minecraft.commands.arguments.ObjectiveArgument
- All Implemented Interfaces:
ArgumentType<String>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DynamicCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final Collection<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectivegetObjective(CommandContext<CommandSourceStack> context, String name) static ObjectivegetWritableObjective(CommandContext<CommandSourceStack> context, String name) listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) static ObjectiveArgumentparse(StringReader reader) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
parse
-
Field Details
-
EXAMPLES
-
ERROR_OBJECTIVE_NOT_FOUND
-
ERROR_OBJECTIVE_READ_ONLY
-
-
Constructor Details
-
ObjectiveArgument
public ObjectiveArgument()
-
-
Method Details
-
objective
-
getObjective
public static Objective getObjective(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getWritableObjective
public static Objective getWritableObjective(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
parse
- Specified by:
parsein interfaceArgumentType<String>- Throws:
CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfaceArgumentType<String>
-
getExamples
- Specified by:
getExamplesin interfaceArgumentType<String>
-