Class MaterialArgumentType

java.lang.Object
com.ultikits.ultitools.command.engine.MaterialArgumentType
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<org.bukkit.Material>, io.papermc.paper.command.brigadier.argument.CustomArgumentType<org.bukkit.Material, net.kyori.adventure.key.Key>

final class MaterialArgumentType extends Object implements io.papermc.paper.command.brigadier.argument.CustomArgumentType<org.bukkit.Material, net.kyori.adventure.key.Key>
Material keys use Paper's resource-key syntax rather than enum spelling.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.papermc.paper.command.brigadier.argument.CustomArgumentType

    io.papermc.paper.command.brigadier.argument.CustomArgumentType.Converted<T,N>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.brigadier.arguments.ArgumentType<net.kyori.adventure.key.Key>
     
    <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
    listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
     
    org.bukkit.Material
    parse(com.mojang.brigadier.StringReader reader)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.papermc.paper.command.brigadier.argument.CustomArgumentType

    getExamples, parse
  • Constructor Details

    • MaterialArgumentType

      MaterialArgumentType()
  • Method Details

    • parse

      public org.bukkit.Material parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<org.bukkit.Material>
      Specified by:
      parse in interface io.papermc.paper.command.brigadier.argument.CustomArgumentType<org.bukkit.Material, net.kyori.adventure.key.Key>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getNativeType

      public com.mojang.brigadier.arguments.ArgumentType<net.kyori.adventure.key.Key> getNativeType()
      Specified by:
      getNativeType in interface io.papermc.paper.command.brigadier.argument.CustomArgumentType<org.bukkit.Material, net.kyori.adventure.key.Key>
    • 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 interface com.mojang.brigadier.arguments.ArgumentType<org.bukkit.Material>
      Specified by:
      listSuggestions in interface io.papermc.paper.command.brigadier.argument.CustomArgumentType<org.bukkit.Material, net.kyori.adventure.key.Key>