Class Settings.Corporation<T>

java.lang.Object
us.teaminceptus.novaconomy.api.settings.Settings.Corporation<T>
All Implemented Interfaces:
Serializable, Settings.NovaSetting<T>
Enclosing class:
Settings

public static final class Settings.Corporation<T> extends Object implements Settings.NovaSetting<T>, Serializable
Represents Corporation Settings
See Also:
  • Field Details

    • JOIN_TYPE

      public static final Settings.Corporation<Corporation.JoinType> JOIN_TYPE
      The privacy setting of a Corporation, determining how and whether businesses can join.
    • CHAT

      public static final Settings.Corporation<Boolean> CHAT
      Whether the Corporation has enabled corporation-only chat.
    • PUBLIC_HEADQUARTERS

      public static final Settings.Corporation<Boolean> PUBLIC_HEADQUARTERS
      Whether anyone can teleport to the Corporation's headquarters.
    • FEATURE_PRODUCTS

      public static final Settings.Corporation<Boolean> FEATURE_PRODUCTS
      Whether random Products under this Corporation will be featured on the main Corporation page.
  • Method Details

    • getDefaultValue

      public T getDefaultValue()
      Description copied from interface: Settings.NovaSetting
      Fetches the default value of this setting.
      Specified by:
      getDefaultValue in interface Settings.NovaSetting<T>
      Returns:
      default value of setting
    • name

      public String name()
      Description copied from interface: Settings.NovaSetting
      Fetches the identifier of this setting.
      Specified by:
      name in interface Settings.NovaSetting<T>
      Returns:
      identifier of setting
    • getDisplayName

      @NotNull public @NotNull String getDisplayName()
      Description copied from interface: Settings.NovaSetting
      Fetches the display name of this setting in the current language.
      Specified by:
      getDisplayName in interface Settings.NovaSetting<T>
      Returns:
      display name of setting
    • getDescription

      @Nullable public @Nullable SettingDescription getDescription()
      Description copied from interface: Settings.NovaSetting
      Fetches the description annotation on this NovaSetting. If no description is present, null is returned.
      Specified by:
      getDescription in interface Settings.NovaSetting<T>
      Returns:
      SettingDescription annotation
    • getPossibleValues

      public Set<T> getPossibleValues()
      Description copied from interface: Settings.NovaSetting
      Fetches all of the possible values for this setting.
      Specified by:
      getPossibleValues in interface Settings.NovaSetting<T>
      Returns:
      possible values of setting
    • values

      @NotNull public static @NotNull Settings.Corporation<?>[] values()
      Fetches an array of all of the Corporation Settings.
      Returns:
      An array of all of the Corporation Settings.
    • valueOf

      @Nullable public static @Nullable Settings.Corporation<?> valueOf(@Nullable @Nullable String name)
      Fetches the Corporation Setting with the given name.
      Parameters:
      name - The name of the Corporation Setting.
      Returns:
      Setting Found, or null if not found
    • valueOf

      public static <T> Settings.Corporation<T> valueOf(@Nullable @Nullable String name, @Nullable @Nullable Class<T> clazz)
      Fetches the Corporation Setting with the given name and type.
      Type Parameters:
      T - Type of the Setting
      Parameters:
      name - The name of the Corporation Setting.
      clazz - The type of the Corporation Setting.
      Returns:
      Setting Found, or null if not found
    • getType

      public Class<T> getType()
      Description copied from interface: Settings.NovaSetting
      Fetches the type of setting this is.
      Specified by:
      getType in interface Settings.NovaSetting<T>
      Returns:
      type of setting
    • parseValue

      @NotNull public T parseValue(@NotNull @NotNull String value)
      Description copied from interface: Settings.NovaSetting
      Parses a value from a string.
      Specified by:
      parseValue in interface Settings.NovaSetting<T>
      Parameters:
      value - String to parse
      Returns:
      Parsed value applicable to this setting
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object