# ConfigScreenChangeEvent > Fired when a player changes a widget value on a config screen. The value type depends on the widget: boolean for toggles, float for sliders, int for selectors (index), String for edit boxes and buttons (reference). `gg.lode.lecternapi.api.event.ConfigScreenChangeEvent` --- ## Signature ```java public class ConfigScreenChangeEvent extends LecternClientEvent ``` --- ## Methods ### getScreenId ```java public String getScreenId() ``` --- ### getWidgetReference ```java public String getWidgetReference() ``` --- ### getValue ```java public Object getValue() ``` --- ### getValueAsBoolean ```java public boolean getValueAsBoolean() ``` --- ### getValueAsFloat ```java public float getValueAsFloat() ``` --- ### getValueAsInt ```java public int getValueAsInt() ``` --- ### getValueAsString ```java public String getValueAsString() ``` --- ## Example Values arrive one at a time, as the player changes them. Read them with the typed accessor that matches the widget you built: ```java @EventHandler public void onConfigChange(ConfigScreenChangeEvent event) { if (!event.getScreenId().equals("settings")) return; switch (event.getWidgetReference()) { case "hints" -> prefs.setHints(event.getPlayer(), event.getValueAsBoolean()); case "scale" -> prefs.setScale(event.getPlayer(), event.getValueAsFloat()); case "name" -> prefs.setName(event.getPlayer(), event.getValueAsString()); default -> { } } } ``` Save here rather than on close. A player who alt-F4s out of the screen never sends a close. --- ## Related Pages - [[ConfigScreenCloseEvent]]. When the screen goes - [[ConfigWidget]]. The widgets and their references - [[IUIManager]]. Showing the screen