# PlayerAltF4Event > Fired when a Lectern client presses Alt+F4 to close the game window. The event fires before the window actually closes; the client will still proceed to disconnect unless other client-side effects block it. `gg.lode.lecternapi.api.event.PlayerAltF4Event` --- ## Signature ```java public class PlayerAltF4Event extends LecternClientEvent ``` --- ## Example The window is going either way. This is your chance to write something down before the player disappears, not a chance to stop them: ```java @EventHandler public void onAltF4(PlayerAltF4Event event) { Player player = event.getPlayer(); combat.markCombatLog(player); getLogger().info(player.getName() + " closed the game with Alt+F4"); } ``` Do the work here, not on the quit that follows. The quit looks like any other. ---