Class YamlTranslation

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

public class YamlTranslation extends Object implements TranslationManager
  • Constructor Details

    • YamlTranslation

      public YamlTranslation()
  • Method Details

    • 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.
    • getMessage

      @NotNull public @NotNull net.kyori.adventure.text.Component getMessage(@NotNull @NotNull String path)
      Specified by:
      getMessage in interface TranslationManager
    • getMessage

      @NotNull public @NotNull net.kyori.adventure.text.Component getMessage(@NotNull @NotNull String path, @NotNull @NotNull String locale)
      Specified by:
      getMessage in interface TranslationManager
    • getMessage

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

      @NotNull public @NotNull net.kyori.adventure.text.Component getMessage(@NotNull @NotNull String path, @NotNull @NotNull org.bukkit.command.CommandSender sender)
      Specified by:
      getMessage in interface TranslationManager
    • getTranslation

      @Nullable public @Nullable Map<String,String> getTranslation(@NotNull @NotNull String locale)
    • getContent

      @NotNull public @NotNull String getContent(@NotNull @NotNull String path, @NotNull @NotNull String locale)
    • addDefaultLocales

      public void addDefaultLocales(boolean replace)
    • 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.
    • getLocalesFolder

      @NotNull public @NotNull File getLocalesFolder()