Package net.minecraft.command.argument
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 Summary
Fields Modifier and Type Field Description private static Collection<String>
EXAMPLES
private static Map<String,Integer>
slotNamesToSlotCommandId
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
UNKNOWN_SLOT_EXCEPTION
-
Constructor Summary
Constructors Constructor Description ItemSlotArgumentType()
-
Method Summary
Modifier and Type Method Description Collection<String>
getExamples()
static int
getItemSlot(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
static ItemSlotArgumentType
itemSlot()
<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
Integer
parse(com.mojang.brigadier.StringReader stringReader)
-
Field Details
-
EXAMPLES
-
UNKNOWN_SLOT_EXCEPTION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_SLOT_EXCEPTION -
slotNamesToSlotCommandId
-
-
Constructor Details
-
ItemSlotArgumentType
public ItemSlotArgumentType()
-
-
Method Details
-
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 interfacecom.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 interfacecom.mojang.brigadier.arguments.ArgumentType<Integer>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<Integer>
-