Class CloudTranslator

java.lang.Object
dev.booky.cloudcore.i18n.CloudTranslator
All Implemented Interfaces:
net.kyori.adventure.translation.Translator

public final class CloudTranslator extends Object implements net.kyori.adventure.translation.Translator
  • Constructor Details

    • CloudTranslator

      public CloudTranslator(ClassLoader classLoader, net.kyori.adventure.key.Keyed translatorName, Locale... locales)
    • CloudTranslator

      public CloudTranslator(ClassLoader classLoader, net.kyori.adventure.key.Keyed translatorName, Collection<Locale> locales)
  • Method Details

    • unload

      public void unload()
    • load

      public void load()
    • name

      @NotNull public @NotNull net.kyori.adventure.key.Key name()
      Specified by:
      name in interface net.kyori.adventure.translation.Translator
    • hasAnyTranslations

      @NotNull public @NotNull net.kyori.adventure.util.TriState hasAnyTranslations()
      Specified by:
      hasAnyTranslations in interface net.kyori.adventure.translation.Translator
    • translate

      @Nullable public @Nullable MessageFormat translate(@NotNull @NotNull String key, @NotNull @NotNull Locale locale)
      Specified by:
      translate in interface net.kyori.adventure.translation.Translator
    • translate

      @Nullable public @Nullable net.kyori.adventure.text.Component translate(@NotNull @NotNull net.kyori.adventure.text.TranslatableComponent component, @NotNull @NotNull Locale locale)
      Specified by:
      translate in interface net.kyori.adventure.translation.Translator