Skip to content

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 ​

new CoreConfigV2()#
Seeds the default profile with a disabled, non-joined ProfileLoad index.js trigger.

Fields ​

anythingIgnored ​

anythingIgnored: List<String>#
Event names omitted only from dispatch to ANYTHING listeners; named listeners still receive them.

defaultProfile ​

defaultProfile: String#
Profile name used when the core initializes its profile manager; initially "default".

maxLockTime ​

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 ​

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

services ​

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

Methods ​

getCurrentProfile ​

getCurrentProfile(): String#
Returns the active profile name. Requires the runner injected into the manager-owned configuration instance.
Returns: the current profile name

getEvents ​

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 ​

profileOptions(): List<String>#
Returns a new list containing the configured profile names.
Returns: a fresh list of profile names

setCurrentProfile ​

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