# ResourcePackLoaded

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

**Since:** 1.5.1

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

Fires when a resource reload completes and the loading overlay begins fading out. The overlay
 is still visible when the event fires. [isGameStart](#com.jsmacrosce.jsmacros.client.api.event.impl.EventResourcePackLoaded_isGameStart) reflects whether that overlay was
 configured without a fade-in.  
 ```js
JsMacros.on("ResourcePackLoaded", JavaWrapper.methodToJava(function (event) {
  const packs = event.loadedPacks;  
  if (event.isGameStart) {
    Chat.log(`startup, with ${packs.size()} packs selected`);  
    return;  
  }
  Chat.log(`reloaded, now on ${packs.size()} packs`);  
}))
 ```

## Constructors

### new EventResourcePackLoaded {#com.jsmacrosce.jsmacros.client.api.event.impl.EventResourcePackLoaded_constructor-boolean-}

```js
new EventResourcePackLoaded(boolean isGameStart)
```

Stores the supplied overlay configuration flag and copies the repository's selected pack
 identifiers at construction; it does not reload resources or dispatch the event.

**Parameters:**
- `isGameStart`: whether the reload overlay was configured without a fade-in

## Fields

### isGameStart {#com.jsmacrosce.jsmacros.client.api.event.impl.EventResourcePackLoaded_isGameStart}

```js
isGameStart: boolean
```

Whether the loading overlay for this reload was configured without a fade-in.

### loadedPacks {#com.jsmacrosce.jsmacros.client.api.event.impl.EventResourcePackLoaded_loadedPacks}

```js
loadedPacks: List<String>
```

The selected resource-pack identifiers copied when this event is constructed. Later changes
 to the selection do not update this list.

## Methods

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

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

Returns a diagnostic string containing the event name, stored overlay configuration flag, and current
 string representation of `loadedPacks`; this is not serialized JSON.

**Returns:** the form `eventName:{"isGameStart": boolean, "loadedPacks": listString}`
