Interface Stat

All Superinterfaces:
NamespaceIdentified, Optioned
All Known Implementing Classes:
CustomStat, Stats

public interface Stat extends Optioned, NamespaceIdentified
  • Method Details

    • isEnabled

      boolean isEnabled()
      Gets whether the stat is enabled in the configuration. Disabled stats have no effect and are hidden from menus and messages.
      Returns:
      whether the stat is enabled
    • getTraits

      List<Trait> getTraits()
      Gets the list of Trait instances leveled by the stat. Traits are the gameplay aspects buffed by a stat. The trait value is determined by the stat level multiplied by the modifier in stats.yml.
      Returns:
      the list of traits
    • getTraitModifier

      double getTraitModifier(Trait trait)
      Gets the modifier value for a Trait associated with the stat defined in stats.yml. The modifier value is multiplied by the stat level to determine the trait value, which is the value directly used by the trait implementation.
      Parameters:
      trait - the trait modifier value
      Returns:
      the trait modifier
    • getDisplayName

      String getDisplayName(Locale locale)
      Gets the stat display name as defined in the locale's messages file.
      Parameters:
      locale - the locale to get the display name in
      Returns:
      the display name in the specified locale or in a fallback language
    • getDisplayName

      String getDisplayName(Locale locale, boolean formatted)
      Gets the stat display name as defined in the locale's messages file.
      Parameters:
      locale - the locale to get the display name in
      formatted - whether to apply formatting to the display name
      Returns:
      the display name in the specified locale or in a fallback language
    • getDescription

      String getDescription(Locale locale)
      Gets the stat description as defined in the locale's messages file.
      Parameters:
      locale - the locale to get the description in
      Returns:
      the description in the specified locale or in a fallback language
    • getDescription

      String getDescription(Locale locale, boolean formatted)
      Gets the stat description as defined in the locale's messages file.
      Parameters:
      locale - the locale to get the description in
      formatted - whether to apply formatting to the description
      Returns:
      the description in the specified locale or in a fallback language
    • getColor

      String getColor(Locale locale)
      Gets the stat color as defined in the messages file.
      Parameters:
      locale - the locale to get the color in
      Returns:
      the color in the specified locale or in a fallback language
    • getColoredName

      String getColoredName(Locale locale)
      Gets the stat's display name applied with its color
      Parameters:
      locale - the locale to get the name and color in
      Returns:
      the colored name
    • getSymbol

      String getSymbol(Locale locale)
      Gets the symbol as defined in the messages file.
      Parameters:
      locale - the locale to get the symbol in
      Returns:
      the symbol in the specified locale or in a fallback language
    • name

      String name()
      Gets a fully uppercase String of the stat name without the namespace
      Returns:
      the stat name in all upper case