Class BukkitBrigadierMapper<C>

  • Type Parameters:
    C - Command sender type

    public final class BukkitBrigadierMapper<C>
    extends java.lang.Object
    Class which handles mapping argument types to their NMS Brigadier counterpart on Bukkit platforms.
    • Constructor Summary

      Constructors 
      Constructor Description
      BukkitBrigadierMapper​(@NonNull BukkitCommandManager<C> commandManager, @NonNull cloud.commandframework.brigadier.CloudBrigadierManager brigadierManager)
      Class that handles mapping argument types to Brigadier for Bukkit (Commodore) and Paper.
    • Method Summary

      Modifier and Type Method Description
      void mapComplexNMS​(@NonNull java.lang.Class<?> type, @NonNull java.util.function.Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier)
      Attempt to register a mapping between a type and a NMS argument type
      void mapSimpleNMS​(@NonNull java.lang.Class<?> type, @NonNull java.lang.reflect.Constructor<?> constructor)
      Attempt to register a mapping between a type and a NMS argument type
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BukkitBrigadierMapper

        public BukkitBrigadierMapper​(@NonNull BukkitCommandManager<C> commandManager,
                                     @NonNull cloud.commandframework.brigadier.CloudBrigadierManager brigadierManager)
        Class that handles mapping argument types to Brigadier for Bukkit (Commodore) and Paper.
        Parameters:
        commandManager - The BukkitCommandManager to use for mapping
        brigadierManager - The CloudBrigadierManager to use for mapping
    • Method Detail

      • mapSimpleNMS

        public void mapSimpleNMS​(@NonNull java.lang.Class<?> type,
                                 @NonNull java.lang.reflect.Constructor<?> constructor)
        Attempt to register a mapping between a type and a NMS argument type
        Parameters:
        type - Type to map
        constructor - Constructor that construct the NMS argument type
      • mapComplexNMS

        public void mapComplexNMS​(@NonNull java.lang.Class<?> type,
                                  @NonNull java.util.function.Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier)
        Attempt to register a mapping between a type and a NMS argument type
        Parameters:
        type - Type to map
        argumentTypeSupplier - Supplier of the NMS argument type