Class ObjectiveArgumentType

java.lang.Object
net.minecraft.command.argument.ObjectiveArgumentType
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<String>

public class ObjectiveArgumentType
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<String>
  • Field Details

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • UNKNOWN_OBJECTIVE_EXCEPTION

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_OBJECTIVE_EXCEPTION
    • READONLY_OBJECTIVE_EXCEPTION

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType READONLY_OBJECTIVE_EXCEPTION
    • LONG_NAME_EXCEPTION

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType LONG_NAME_EXCEPTION
  • Constructor Details

    • ObjectiveArgumentType

      public ObjectiveArgumentType()
  • Method Details

    • objective

      public static ObjectiveArgumentType objective()
    • getObjective

      public static ScoreboardObjective getObjective​(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
    • getWritableObjective

      public static ScoreboardObjective getWritableObjective​(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
    • parse

      public String parse​(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<String>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions​(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<String>
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<String>