Class BukkitTranslationBundle

java.lang.Object
org.incendo.cloud.translations.bukkit.BukkitTranslationBundle

@API(status=STABLE) public final class BukkitTranslationBundle extends Object
A bundle of Bukkit translations.

This can be registered to the command manager by accessing the caption registry using CommandManager.captionRegistry() and then registering the provider using CaptionRegistry.registerProvider(CaptionProvider):

TranslationBundle<C> bundle = BukkitTranslationBundle.bukkit(sender -> sender.locale());
 manager.captionRegistry().registerProvider(translationBundle);
  • Constructor Details

    • BukkitTranslationBundle

      public BukkitTranslationBundle()
  • Method Details

    • bukkit

      public static <C> @NonNull TranslationBundle<C> bukkit(@NonNull LocaleExtractor<C> localeExtractor)
      Returns the translation bundle for cloud-bukkit translations.
      Type Parameters:
      C - command sender type
      Parameters:
      localeExtractor - locale extractor
      Returns:
      the translation bundle