# QuitGame

`com.jsmacrosce.jsmacros.client.api.event.impl.EventQuitGame`

**Since:** 1.8.4

**Cancellable:** No. Calling `event.cancel()` throws `UnsupportedOperationException`.

Fires during JVM shutdown from a shutdown hook registered by JsMacros. It has no payload.  
Listener work may not finish before the process exits. This event does not fire when leaving a
world while the game continues running; use
[EventDisconnect](world/EventDisconnect.md) for that transition.

## Constructors

### new EventQuitGame {#com.jsmacrosce.jsmacros.client.api.event.impl.EventQuitGame_constructor-}

```js
new EventQuitGame()
```

Initializes the event with the JsMacros client core as its runner; construction does not dispatch it.

## Methods

### toString {#com.jsmacrosce.jsmacros.client.api.event.impl.EventQuitGame_toString-}

```js
toString(): String
```

Returns a diagnostic string containing the event name and an empty-brace payload marker, not JSON.

**Returns:** the event name followed by `:{}`
