Class YamlTranslation

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

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
    • init

      public void init()
      Description copied from interface: Manager
      Initialization of manager.
      Specified by:
      init in interface Manager
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Manager
      Checks if manager is ready to work.
      Specified by:
      isEnabled in interface Manager
      Returns:
      true - if enabled, false - disabled.
    • getName

      public 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.