Class Settings.Business<T>

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

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

    • PUBLIC_OWNER

      public static final Settings.Business<Boolean> PUBLIC_OWNER
      Whether the owner of the Business is public.
    • PUBLIC_STATISTICS

      public static final Settings.Business<Boolean> PUBLIC_STATISTICS
      Whether the statistics of the Business are public.
    • PUBLIC_HOME

      public static final Settings.Business<Boolean> PUBLIC_HOME
      Whether consumers of the Business can teleport to its home.
    • PUBLIC_RATING

      public static final Settings.Business<Boolean> PUBLIC_RATING
      Whether the consumers of the Business can see the rating.
    • PUBLIC_DISCOVERY

      public static final Settings.Business<Boolean> PUBLIC_DISCOVERY
      Whether this business is discoverable.
    • AUTOMATIC_DEPOSIT

      public static final Settings.Business<Boolean> AUTOMATIC_DEPOSIT
      Whether the Business will automatically deposit 15% of its earnings into its advertising balance.
    • EXTERNAL_ADVERTISEMENT

      public static final Settings.Business<Boolean> EXTERNAL_ADVERTISEMENT
      Whether the Business allows advertising from other businesses.
    • SUPPLY_INTERVAL

      public static final Settings.Business<BusinessSupplyEvent.Interval> SUPPLY_INTERVAL
      The interval at which the Business will supply its stock from its supply locations.
      See Also:
  • 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.Business<?>[] 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.Business<?> 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.Business<T> valueOf(@Nullable @Nullable String name, @Nullable @Nullable Class<T> clazz)
      Fetches the Business 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