Package cloud.commandframework.bukkit
Class BukkitBrigadierMapper<C>
java.lang.Object
cloud.commandframework.bukkit.BukkitBrigadierMapper<C>
- Type Parameters:
C
- Command sender type
Class which handles mapping argument types to their NMS Brigadier counterpart on Bukkit platforms.
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitBrigadierMapper
(@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 TypeMethodDescriptionvoid
mapComplexNMS
(@NonNull Class<?> type, @NonNull Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier) Deprecated.<T extends cloud.commandframework.arguments.parser.ArgumentParser<C,
?>>
voidmapNMS
(@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,
?>>
voidmapSimpleNMS
(@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,
?>>
voidmapSimpleNMS
(@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.usemapSimpleNMS(TypeToken, String)
instead
-
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
- TheBukkitCommandManager
to use for mappingbrigadierManager
- TheCloudBrigadierManager
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 mapargumentId
- 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 mapargumentId
- network id of argument typeuseCloudSuggestions
- 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 mapargumentTypeSupplier
- Supplier of the NMS argument type- Since:
- 1.5.0
-
mapSimpleNMS
Deprecated.usemapSimpleNMS(TypeToken, String)
insteadAttempt to register a mapping between a type and a NMS argument type- Parameters:
type
- Type to mapconstructor
- Constructor that construct the NMS argument type
-
mapComplexNMS
@Deprecated public void mapComplexNMS(@NonNull Class<?> type, @NonNull Supplier<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeSupplier) Deprecated.usemapNMS(TypeToken, Supplier)
insteadAttempt to register a mapping between a type and a NMS argument type- Parameters:
type
- Type to mapargumentTypeSupplier
- Supplier of the NMS argument type
-
mapNMS(TypeToken, Supplier)
instead