Class GameModeArgumentType

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

public class GameModeArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<GameMode>
Mappings:
Namespace Name
official ec
intermediary net/minecraft/class_7918
named net/minecraft/command/argument/GameModeArgumentType
  • Field Details

    • EXAMPLES

      private static final Collection<String> EXAMPLES
      Mappings:
      Namespace Name Mixin selector
      official a Lec;a:Ljava/util/Collection;
      intermediary field_41088 Lnet/minecraft/class_7918;field_41088:Ljava/util/Collection;
      named EXAMPLES Lnet/minecraft/command/argument/GameModeArgumentType;EXAMPLES:Ljava/util/Collection;
    • VALUES

      private static final GameMode[] VALUES
      Mappings:
      Namespace Name Mixin selector
      official b Lec;b:[Lcmf;
      intermediary field_41089 Lnet/minecraft/class_7918;field_41089:[Lnet/minecraft/class_1934;
      named VALUES Lnet/minecraft/command/argument/GameModeArgumentType;VALUES:[Lnet/minecraft/world/GameMode;
    • INVALID_GAME_MODE_EXCEPTION

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType INVALID_GAME_MODE_EXCEPTION
      Mappings:
      Namespace Name Mixin selector
      official c Lec;c:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
      intermediary field_41090 Lnet/minecraft/class_7918;field_41090:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
      named INVALID_GAME_MODE_EXCEPTION Lnet/minecraft/command/argument/GameModeArgumentType;INVALID_GAME_MODE_EXCEPTION:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
  • Constructor Details

    • GameModeArgumentType

      public GameModeArgumentType()
  • Method Details

    • parse

      public GameMode parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<GameMode>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      official a Lec;a(Lcom/mojang/brigadier/StringReader;)Lcmf;
      intermediary method_47384 Lnet/minecraft/class_7918;method_47384(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_1934;
      named parse Lnet/minecraft/command/argument/GameModeArgumentType;parse(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/world/GameMode;
    • 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<GameMode>
      Mappings:
      Namespace Name Mixin selector
      official listSuggestions Lec;listSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
      intermediary listSuggestions Lnet/minecraft/class_7918;listSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
      named listSuggestions Lnet/minecraft/command/argument/GameModeArgumentType;listSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
    • getExamples

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

      public static GameModeArgumentType gameMode()
      Mappings:
      Namespace Name Mixin selector
      official a Lec;a()Lec;
      intermediary method_47383 Lnet/minecraft/class_7918;method_47383()Lnet/minecraft/class_7918;
      named gameMode Lnet/minecraft/command/argument/GameModeArgumentType;gameMode()Lnet/minecraft/command/argument/GameModeArgumentType;
    • getGameMode

      public static GameMode getGameMode(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      official a Lec;a(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Lcmf;
      intermediary method_47385 Lnet/minecraft/class_7918;method_47385(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Lnet/minecraft/class_1934;
      named getGameMode Lnet/minecraft/command/argument/GameModeArgumentType;getGameMode(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Lnet/minecraft/world/GameMode;