java.lang.Object
java.lang.Enum<LanguagePreset>
io.github.thebusybiscuit.slimefun4.core.services.localization.LanguagePreset
All Implemented Interfaces:
Serializable, Comparable<LanguagePreset>, Constable

public enum LanguagePreset extends Enum<LanguagePreset>
This enum holds info about a Language that is embedded in our resources folder. Every enum constant holds the key of that Language as well as a texture hash for the ItemStack to display.
Author:
TheBusyBiscuit
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static LanguagePreset[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LanguagePreset valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getLanguageCode

      @Nonnull public String getLanguageCode()
      This returns the id of this Language.
      Returns:
      The language code
    • getTexture

      @Nonnull public String getTexture()
      This returns the texture hash for this language. This will be the flag of the corresponding country. (Not accurate I know, but better than having all languages look the same by using the same items)
      Returns:
      The texture hash of this language
    • getTextDirection

      @Nonnull public TextDirection getTextDirection()
      This returns the direction of text for this language.
      Returns:
      The direction of text for this language