Class BukkitBrigadierMapper<C>

java.lang.Object
cloud.commandframework.bukkit.BukkitBrigadierMapper<C>
Type Parameters:
C - Command sender type

public final class BukkitBrigadierMapper<C> extends 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<C,?> brigadierManager)
    Class that handles mapping argument types to Brigadier for Bukkit (Commodore) and Paper.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    mapComplexNMS(@NonNull Class<?> type, @NonNull Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier)
    Deprecated.
    <T extends cloud.commandframework.arguments.parser.ArgumentParser<C, ?>>
    void
    mapNMS(@NonNull io.leangen.geantyref.TypeToken<T> type, @NonNull Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier)
    Attempt to register a mapping between a type and a NMS argument type
    <T extends cloud.commandframework.arguments.parser.ArgumentParser<C, ?>>
    void
    mapSimpleNMS(@NonNull io.leangen.geantyref.TypeToken<T> type, @NonNull String argumentId)
    Attempt to register a mapping between a cloud argument parser type and an NMS brigadier argument type which has a no-args constructor.
    <T extends cloud.commandframework.arguments.parser.ArgumentParser<C, ?>>
    void
    mapSimpleNMS(@NonNull io.leangen.geantyref.TypeToken<T> type, @NonNull String argumentId, boolean useCloudSuggestions)
    Attempt to register a mapping between a cloud argument parser type and an NMS brigadier argument type which has a no-args constructor.
    void
    mapSimpleNMS(@NonNull Class<?> type, @NonNull Constructor<?> constructor)
    Deprecated.

    Methods inherited from class java.lang.Object

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

    • BukkitBrigadierMapper

      public BukkitBrigadierMapper(@NonNull BukkitCommandManager<C> commandManager, @NonNull cloud.commandframework.brigadier.CloudBrigadierManager<C,?> 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 Details

    • mapSimpleNMS

      public <T extends cloud.commandframework.arguments.parser.ArgumentParser<C, ?>> void mapSimpleNMS(@NonNull io.leangen.geantyref.TypeToken<T> type, @NonNull String argumentId)
      Attempt to register a mapping between a cloud argument parser type and an NMS brigadier argument type which has a no-args constructor.
      Type Parameters:
      T - argument parser type
      Parameters:
      type - Type to map
      argumentId - network id of argument type
      Since:
      1.5.0
    • mapSimpleNMS

      public <T extends cloud.commandframework.arguments.parser.ArgumentParser<C, ?>> void mapSimpleNMS(@NonNull io.leangen.geantyref.TypeToken<T> type, @NonNull String argumentId, boolean useCloudSuggestions)
      Attempt to register a mapping between a cloud argument parser type and an NMS brigadier argument type which has a no-args constructor.
      Type Parameters:
      T - argument parser type
      Parameters:
      type - Type to map
      argumentId - network id of argument type
      useCloudSuggestions - whether to use cloud suggestions
      Since:
      1.6.0
    • mapNMS

      public <T extends cloud.commandframework.arguments.parser.ArgumentParser<C, ?>> void mapNMS(@NonNull io.leangen.geantyref.TypeToken<T> type, @NonNull Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier)
      Attempt to register a mapping between a type and a NMS argument type
      Type Parameters:
      T - argument parser type
      Parameters:
      type - Type to map
      argumentTypeSupplier - Supplier of the NMS argument type
      Since:
      1.5.0
    • mapSimpleNMS

      @Deprecated public void mapSimpleNMS(@NonNull Class<?> type, @NonNull Constructor<?> constructor)
      Deprecated.
      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

      @Deprecated public void mapComplexNMS(@NonNull Class<?> type, @NonNull Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier)
      Deprecated.
      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