# CoreConfigV2

`com.jsmacrosce.jsmacros.core.config.CoreConfigV2`

Holds core profile, service, and event-dispatch settings. Obtain the managed instance through the
configuration manager; its runner is injected by that manager.  
```js
const config = JsMacros.getConfig().getOptions(Java.type("com.jsmacrosce.jsmacros.core.config.CoreConfigV2"));  
Chat.log(`${config.getCurrentProfile()}: ${config.profileOptions()}`);  
```

## Constructors

### new CoreConfigV2 {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_constructor-}

```js
new CoreConfigV2()
```

Seeds the default profile with a disabled, non-joined `ProfileLoad` `index.js` trigger.

## Fields

### anythingIgnored {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_anythingIgnored}

```js
anythingIgnored: List<String>
```

Event names omitted only from dispatch to `ANYTHING` listeners; named listeners still receive them.

### defaultProfile {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_defaultProfile}

```js
defaultProfile: String
```

Profile name used when the core initializes its profile manager; initially `"default"`.

### maxLockTime {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_maxLockTime}

```js
maxLockTime: long
```

Configured nonnegative delay, in milliseconds, before the joined-lock watchdog's timed check; initially `500`. This is not an exact deadline or scheduling guarantee.

### profiles {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_profiles}

```js
profiles: Map<String, List<ScriptTrigger>>
```

Maps profile names to their mutable script-trigger lists; construction seeds the `default` entry.

### services {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_services}

```js
services: Map<String, ServiceTrigger>
```

Configured service triggers, keyed by service name; this is not the running-service registry.

## Methods

### getCurrentProfile {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_getCurrentProfile-}

```js
getCurrentProfile(): String
```

Returns the active profile name. Requires the runner injected into the manager-owned configuration instance.

**Returns:** the current profile name

### getEvents {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_getEvents-}

```js
getEvents(): List<String>
```

Returns a snapshot of registered event names; requires the runner injected into the manager-owned instance.

**Returns:** a fresh list of event names

### profileOptions {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_profileOptions-}

```js
profileOptions(): List<String>
```

Returns a new list containing the configured profile names.

**Returns:** a fresh list of profile names

### setCurrentProfile {#com.jsmacrosce.jsmacros.core.config.CoreConfigV2_setCurrentProfile-String-}

```js
setCurrentProfile(String pname): void
```

Saves the active profile, then loads or creates the named profile; requires a manager-owned instance with its runner injected.

**Parameters:**
- `pname`: name of the profile to load or create
