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>EXAMPLESprivate static Map<String,Integer>slotNamesToSlotCommandIdprivate static com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeUNKNOWN_SLOT_EXCEPTION -
Constructor Summary
Constructors Constructor Description ItemSlotArgumentType() -
Method Summary
Modifier and Type Method Description Collection<String>getExamples()static intgetItemSlot(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)static ItemSlotArgumentTypeitemSlot()<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)Integerparse(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:
parsein 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:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<Integer>
-
getExamples
- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<Integer>
-