Class MinecraftArgumentTypes


  • public final class MinecraftArgumentTypes
    extends Object
    A registry of the ArgumentTypes provided by Minecraft.
    • Method Detail

      • isRegistered

        public static boolean isRegistered​(org.bukkit.NamespacedKey key)
        Gets if a argument is registered for the given key.
        Parameters:
        key - the key
        Returns:
        if an argument is registered
      • getClassByKey

        public static Class<? extends com.mojang.brigadier.arguments.ArgumentType<?>> getClassByKey​(org.bukkit.NamespacedKey key)
                                                                                             throws IllegalArgumentException
        Gets a registered argument type class by key.
        Parameters:
        key - the key
        Returns:
        the returned argument type class
        Throws:
        IllegalArgumentException - if no such argument is registered
      • getByKey

        public static com.mojang.brigadier.arguments.ArgumentType<?> getByKey​(org.bukkit.NamespacedKey key)
                                                                       throws IllegalArgumentException
        Gets a registered argument type by key.
        Parameters:
        key - the key
        Returns:
        the returned argument
        Throws:
        IllegalArgumentException - if no such argument is registered