Class DynamicTreesSetting

java.lang.Object
com.minecolonies.core.colony.buildings.modules.settings.IntSetting
com.minecolonies.core.colony.buildings.modules.settings.DynamicTreesSetting
All Implemented Interfaces:
ISetting<Integer>

public class DynamicTreesSetting extends IntSetting
  • Constructor Details

    • DynamicTreesSetting

      public DynamicTreesSetting()
      Create a new dynamic trees setting, using the config value as initial value.
    • DynamicTreesSetting

      public DynamicTreesSetting(int value, int defaultValue)
      Create a new dynamic tree setting
      Parameters:
      value - the current value
      defaultValue - the default value
  • Method Details

    • isActive

      public boolean isActive(ISettingsModule module)
      Description copied from interface: ISetting
      Check if this setting is active (provided ISettingsModule.getOptionalSetting(ISettingKey) is used).
      Returns:
      true if the setting is active;
    • shouldHideWhenInactive

      public boolean shouldHideWhenInactive()
      Description copied from interface: ISetting
      Configures if this setting is inactive, whether it should show in the settings at all. This would default to false in most cases as we want to prevent not showing settings, but certain settings related to addon mods may want to be hidden if another mod is not loaded.
      Returns:
      true if the inactive setting should be hidden.
    • isActive

      public boolean isActive(ISettingsModuleView module)
      Description copied from interface: ISetting
      Check if this setting is active (provided ISettingsModule.getOptionalSetting(ISettingKey) is used).
      Returns:
      a component containing a message why this setting is not active, return null if the setting is supposed to be active.