Class LanguageFile


  • public class LanguageFile
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      LanguageFile​(org.bukkit.plugin.java.JavaPlugin plugin)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String convertListToMultilineString​(java.util.List<java.lang.String> list)
      Converts a list of string to one long string with \n inserted after every element of the list.
      java.lang.String getString​(java.lang.String path)
      Gets the string list located in the specified path.
      java.util.List<java.lang.String> getStringList​(java.lang.String path)
      Gets the string list located in the specified path.
      void reloadFile()
      Reloads the .yml file from the disk.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LanguageFile

        public LanguageFile​(org.bukkit.plugin.java.JavaPlugin plugin)
    • Method Detail

      • getString

        public java.lang.String getString​(java.lang.String path)
        Gets the string list located in the specified path. The language code is not required, as that is determined by the administrators of the server.
        Parameters:
        path - The path of the string.
        Returns:
        The string located at the path.
      • getStringList

        public java.util.List<java.lang.String> getStringList​(java.lang.String path)
        Gets the string list located in the specified path. The language code is not required, as that is determined by the administrators of the server.
        Parameters:
        path - The path of the string list.
        Returns:
        The list of strings located at the path.
      • convertListToMultilineString

        public java.lang.String convertListToMultilineString​(java.util.List<java.lang.String> list)
        Converts a list of string to one long string with \n inserted after every element of the list.
        Parameters:
        list - The text list
        Returns:
        The string containing \n characters.
      • reloadFile

        public void reloadFile()
        Reloads the .yml file from the disk.