Class RegistryEntryArgument<T>

java.lang.Object
com.github.darksoulq.abyssallib.server.command.argument.RegistryEntryArgument<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<T>, io.papermc.paper.command.brigadier.argument.CustomArgumentType<T, org.bukkit.NamespacedKey>

@NullMarked public class RegistryEntryArgument<T> extends Object implements io.papermc.paper.command.brigadier.argument.CustomArgumentType<T, org.bukkit.NamespacedKey>
  • Constructor Details

    • RegistryEntryArgument

      public RegistryEntryArgument(Registry<T> registry, Predicate<T> filter)
  • Method Details

    • registryEntry

      public static <T> RegistryEntryArgument<T> registryEntry(Registry<T> registry)
    • registryEntry

      public static <T> RegistryEntryArgument<T> registryEntry(Registry<T> registry, Predicate<T> filter)
    • parse

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

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