Interface IBuilderElevatorSetting<T>
-
- All Superinterfaces:
IElevatorSetting<T>
public interface IBuilderElevatorSetting<T> extends IElevatorSetting<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull IElevatorSetting<T>addAction(@NotNull java.lang.String action, @NotNull java.lang.String description)Adds an informational UI action line to this setting's icon/lore.booleancanBeEditedIndividually(@NotNull IElevator elevator)Returns whether this setting supports per-elevator (individual) editing for the given elevator.TgetGlobalValue(@NotNull IElevatorType apiElevatorType)Returns the global value of this setting for the given elevator type.voidonClickGlobal(@NotNull org.bukkit.entity.Player player, @NotNull IElevatorType apiElevatorType, @NotNull java.lang.Runnable returnMethod, @NotNull org.bukkit.event.inventory.InventoryClickEvent clickEvent, T currentValue)Called when the setting is clicked in a global context, with the current global value already provided.voidonClickIndividual(@NotNull org.bukkit.entity.Player player, @NotNull IElevator elevator, @NotNull java.lang.Runnable returnMethod, @NotNull org.bukkit.event.inventory.InventoryClickEvent clickEvent, T currentValue)Called when the setting is clicked in an individual context, with the current individual value already provided.-
Methods inherited from interface me.keehl.elevators.api.models.IElevatorSetting
clickGlobal, clickIndividual, createIcon, getIndividualValue, getPlugin, getSettingName, isSettingGlobalOnly, setIndividualValue
-
-
-
-
Method Detail
-
canBeEditedIndividually
boolean canBeEditedIndividually(@NotNull @NotNull IElevator elevator)Description copied from interface:IElevatorSettingReturns whether this setting supports per-elevator (individual) editing for the given elevator.If this returns false, the setting is effectively global-only for that elevator.
- Specified by:
canBeEditedIndividuallyin interfaceIElevatorSetting<T>- Parameters:
elevator- non-null elevator context- Returns:
- true if per-elevator editing is supported; otherwise false
-
onClickGlobal
void onClickGlobal(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull IElevatorType apiElevatorType, @NotNull @NotNull java.lang.Runnable returnMethod, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent clickEvent, @NotNull T currentValue)Description copied from interface:IElevatorSettingCalled when the setting is clicked in a global context, with the current global value already provided.- Specified by:
onClickGlobalin interfaceIElevatorSetting<T>- Parameters:
player- non-null clicking playerapiElevatorType- non-null elevator type being editedreturnMethod- non-null callback to return to the previous UIclickEvent- non-null inventory click eventcurrentValue- current global value
-
onClickIndividual
void onClickIndividual(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull IElevator elevator, @NotNull @NotNull java.lang.Runnable returnMethod, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent clickEvent, @NotNull T currentValue)Description copied from interface:IElevatorSettingCalled when the setting is clicked in an individual context, with the current individual value already provided.- Specified by:
onClickIndividualin interfaceIElevatorSetting<T>- Parameters:
player- non-null clicking playerelevator- non-null elevator being editedreturnMethod- non-null callback to return to the previous UIclickEvent- non-null inventory click eventcurrentValue- current individual value
-
getGlobalValue
@NotNull T getGlobalValue(@NotNull @NotNull IElevatorType apiElevatorType)
Description copied from interface:IElevatorSettingReturns the global value of this setting for the given elevator type.- Specified by:
getGlobalValuein interfaceIElevatorSetting<T>- Parameters:
apiElevatorType- non-null elevator type context- Returns:
- the global value (implementations should not return
nullunless explicitly documented)
-
addAction
@NotNull @NotNull IElevatorSetting<T> addAction(@NotNull @NotNull java.lang.String action, @NotNull @NotNull java.lang.String description)
Description copied from interface:IElevatorSettingAdds an informational UI action line to this setting's icon/lore.This does not change the setting value; it only affects the generated icon lore.
- Specified by:
addActionin interfaceIElevatorSetting<T>- Parameters:
action- non-null action label (e.g., "LEFT-CLICK")description- non-null action description- Returns:
- this setting instance (for chaining)
-
-