Class BungeeLanguageConfig

java.lang.Object
de.themoep.utils.lang.LanguageConfig<net.md_5.bungee.config.Configuration>
de.themoep.utils.lang.bungee.BungeeLanguageConfig

public class BungeeLanguageConfig extends LanguageConfig<net.md_5.bungee.config.Configuration>
  • Field Details

    • yml

      protected static final net.md_5.bungee.config.ConfigurationProvider yml
  • Constructor Details

    • BungeeLanguageConfig

      public BungeeLanguageConfig(net.md_5.bungee.api.plugin.Plugin plugin, String resourceFolder, File configFile, String locale)
    • BungeeLanguageConfig

      public BungeeLanguageConfig(net.md_5.bungee.api.plugin.Plugin plugin, String resourceFolder, File configFile, String locale, boolean saveFile)
  • Method Details

    • loadConfig

      public void loadConfig()
      Description copied from class: LanguageConfig
      Load the config from the file system
      Specified by:
      loadConfig in class LanguageConfig<net.md_5.bungee.config.Configuration>
    • saveConfigResource

      public boolean saveConfigResource()
      Description copied from class: LanguageConfig
      Save the default config resource from the jar file to the file system
      Specified by:
      saveConfigResource in class LanguageConfig<net.md_5.bungee.config.Configuration>
      Returns:
      Whether or not the file was saved. If it already existed this will return false
    • contains

      public boolean contains(String key)
      Description copied from class: LanguageConfig
      Check if the config contains a certain key
      Specified by:
      contains in class LanguageConfig<net.md_5.bungee.config.Configuration>
      Parameters:
      key - The key of the string
      Returns:
      true if this config (and not the defaults) has this key, false if not
    • contains

      public boolean contains(String key, boolean checkDefault)
      Description copied from class: LanguageConfig
      Check if the config contains a certain key
      Specified by:
      contains in class LanguageConfig<net.md_5.bungee.config.Configuration>
      Parameters:
      key - The key of the string
      checkDefault - Whether or not to check the default config
      Returns:
      true if this config (and the default) has this key, false if not
    • get

      public String get(String key)
      Description copied from class: LanguageConfig
      Get a string from the config by its key
      Specified by:
      get in class LanguageConfig<net.md_5.bungee.config.Configuration>
      Parameters:
      key - The key of the string
      Returns:
      The message or an error message if it doesn't exist; never null! (use LanguageConfig.contains(String) to check existance)
    • getRawConfig

      public net.md_5.bungee.config.Configuration getRawConfig()
      Description copied from class: LanguageConfig
      Get the raw config object
      Specified by:
      getRawConfig in class LanguageConfig<net.md_5.bungee.config.Configuration>
      Returns:
      The raw config object