Interface Trait

All Superinterfaces:
NamespaceIdentified, Optioned, ReloadableIdentifier
All Known Implementing Classes:
CustomTrait, Traits

public interface Trait extends Optioned, ReloadableIdentifier
  • Method Details

    • isEnabled

      boolean isEnabled()
      Gets whether the trait is enabled. Disabled traits will have no effect and will be hidden from menus.
      Returns:
      whether the trait is enabled
    • getDisplayName

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

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

      String getMenuDisplay(double value, Locale locale)
      Formats the given value of this trait to the format shown in the stats menu.
      Parameters:
      value - the value of the trait
      locale - the locale to format in
      Returns:
      the formatted value
    • name

      String name()
      Gets a fully uppercase String of the trait name without the namespace
      Specified by:
      name in interface ReloadableIdentifier
      Returns:
      the trait name in all upper case