Class YamlTranslation

java.lang.Object
ua.mcchickenstudio.opencreative.indev.translation.YamlTranslation
All Implemented Interfaces:
TranslationManager, Manager, Startable

public class YamlTranslation extends Object implements TranslationManager
  • Constructor Details

    • YamlTranslation

      public YamlTranslation()
  • Method Details

    • getTranslations

      @NotNull public @NotNull List<Translation> getTranslations()
      Specified by:
      getTranslations in interface TranslationManager
    • getTranslation

      @Nullable public @Nullable Translation getTranslation(@NotNull @NotNull String lang)
      Specified by:
      getTranslation in interface TranslationManager
    • getLocaleComponent

      @NotNull public @NotNull net.kyori.adventure.text.Component getLocaleComponent(@NotNull @NotNull String id, @NotNull @NotNull String lang)
      Specified by:
      getLocaleComponent in interface TranslationManager
    • hasLocaleComponent

      public boolean hasLocaleComponent(@NotNull @NotNull String id, @NotNull @NotNull String lang)
      Specified by:
      hasLocaleComponent in interface TranslationManager
    • getLocaleComponent

      @NotNull public @NotNull net.kyori.adventure.text.Component getLocaleComponent(@NotNull @NotNull String id, @NotNull @NotNull String lang, @NotNull @NotNull net.kyori.adventure.text.Component def)
      Specified by:
      getLocaleComponent in interface TranslationManager
    • getLocaleComponent

      @NotNull public @NotNull net.kyori.adventure.text.Component getLocaleComponent(@NotNull @NotNull String id, @NotNull @NotNull org.bukkit.OfflinePlayer player)
      Specified by:
      getLocaleComponent in interface TranslationManager
    • getLocaleComponent

      @NotNull public @NotNull net.kyori.adventure.text.Component getLocaleComponent(@NotNull @NotNull String id, @NotNull @NotNull org.bukkit.OfflinePlayer player, @NotNull @NotNull net.kyori.adventure.text.Component def)
      Specified by:
      getLocaleComponent in interface TranslationManager
    • start

      public void start()
      Description copied from interface: Startable
      Does tasks on start.
      Specified by:
      start in interface Startable
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.