Class GuardPatrolModeSetting
java.lang.Object
com.minecolonies.core.colony.buildings.modules.settings.StringSetting
com.minecolonies.core.colony.buildings.modules.settings.StringSettingWithDesc
com.minecolonies.core.colony.buildings.modules.settings.GuardPatrolModeSetting
- All Implemented Interfaces:
ISetting<String>,IStringSetting<String>
Stores the patrol mode setting.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDifferent setting possibilities.static final StringFields inherited from class com.minecolonies.core.colony.buildings.modules.settings.StringSetting
currentIndex, MAX_BUTTON_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new patrol mode list setting.GuardPatrolModeSetting(List<String> settings, int currentIndex) Create a new patrol mode list setting. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive(ISettingsModule module) Check if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).booleanisActive(ISettingsModuleView module) Check if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).booleanConfigures if this setting is inactive, whether it should show in the settings at all.Methods inherited from class com.minecolonies.core.colony.buildings.modules.settings.StringSetting
copyValue, getButtonWidth, getCurrentIndex, getDefault, getDisplayText, getLayoutItem, getSettings, getValue, isIndexAllowed, render, set, setupHandler, trigger, updateSettingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.modules.settings.ISetting
getInactiveReason, getToolTipText, onUpdate, setHoverPane
-
Field Details
-
AUTO
Different setting possibilities.- See Also:
-
MANUAL
- See Also:
-
-
Constructor Details
-
GuardPatrolModeSetting
public GuardPatrolModeSetting()Create a new patrol mode list setting. -
GuardPatrolModeSetting
Create a new patrol mode list setting.- Parameters:
settings- the overall list of settings.currentIndex- the current selected index.
-
-
Method Details
-
isActive
Description copied from interface:ISettingCheck if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).- Returns:
- true if the setting is active;
-
isActive
Description copied from interface:ISettingCheck if this setting is active (providedISettingsModule.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.
-
shouldHideWhenInactive
public boolean shouldHideWhenInactive()Description copied from interface:ISettingConfigures 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.
-