Class ItemSlotArgumentType

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

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

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • UNKNOWN_SLOT_EXCEPTION

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_SLOT_EXCEPTION
    • slotNamesToSlotCommandId

      private static final Map<String,​Integer> slotNamesToSlotCommandId
  • Constructor Details

    • ItemSlotArgumentType

      public ItemSlotArgumentType()
  • Method Details

    • itemSlot

      public static ItemSlotArgumentType itemSlot()
    • getItemSlot

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

      public Integer parse​(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<Integer>
      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<Integer>
    • getExamples

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