Class ItemArgument
java.lang.Object
com.zenith.command.brigadier.ItemArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<ItemData>, SerializableArgumentType<ItemData>
Does not support the full vanilla item arg syntax with data components like `minecraft:stone{Count:1b}`
only supports parsing from an item name
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean@NonNull CommandParserbooleanstatic ItemDatagetItem(com.mojang.brigadier.context.CommandContext<CommandContext> context, String name) inthashCode()static ItemArgumentitem()CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) parse(com.mojang.brigadier.StringReader reader) toString()Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType
getExamples, parseMethods inherited from interface SerializableArgumentType
askServerForSuggestions, commandProperties
-
Field Details
-
INVALID_ITEM_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_ITEM_EXCEPTION
-
-
Constructor Details
-
ItemArgument
public ItemArgument()
-
-
Method Details
-
item
-
parse
-
getItem
public static ItemData getItem(com.mojang.brigadier.context.CommandContext<CommandContext> context, String name) -
commandParser
- Specified by:
commandParserin interfaceSerializableArgumentType<ItemData>
-
listSuggestions
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<ItemData>
-
equals
-
canEqual
-
hashCode
-
toString
-