Package net.minecraft.commands.arguments
Class ItemEnchantmentArgument
java.lang.Object
net.minecraft.commands.arguments.ItemEnchantmentArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Enchantment>
public class ItemEnchantmentArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<Enchantment>
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static Collection<String>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemEnchantmentArgument
static Enchantment
getEnchantment(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_95264_, String p_95265_)
<S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_95272_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_95273_)
parse(com.mojang.brigadier.StringReader p_95262_)
-
Field Details
-
EXAMPLES
-
ERROR_UNKNOWN_ENCHANTMENT
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_ENCHANTMENT
-
-
Constructor Details
-
ItemEnchantmentArgument
public ItemEnchantmentArgument()
-
-
Method Details
-
enchantment
-
getEnchantment
public static Enchantment getEnchantment(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_95264_, String p_95265_) -
parse
public Enchantment parse(com.mojang.brigadier.StringReader p_95262_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<Enchantment>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_95272_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_95273_)- Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<Enchantment>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<Enchantment>
-