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 Details

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • ERROR_UNKNOWN_ENCHANTMENT

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_ENCHANTMENT
  • Constructor Details

    • ItemEnchantmentArgument

      public ItemEnchantmentArgument()
  • Method Details

    • enchantment

      public static ItemEnchantmentArgument 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 interface com.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 interface com.mojang.brigadier.arguments.ArgumentType<Enchantment>
    • getExamples

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