ProfileLoad
com.jsmacrosce.jsmacros.core.event.impl.EventProfileLoad
Fires after a profile's script triggers have been registered, including at startup and on profile switches. Script event listeners remain registered when triggers are replaced, so listeners can observe subsequent loads. No event is fired when the profile has no trigger list; a missing profile is created with an empty list and does fire this event.
js
// The default profile's index.js can register a listener for later profile switches.
JsMacros.on("ProfileLoad", JavaWrapper.methodToJava(function (event) {
Chat.log(`"${event.profileName}" is ready, setting the rest of the profile up`);
}));Constructors
new EventProfileLoad
new EventProfileLoad(BaseProfile profile, String profileName)#Initializes this event with the source profile's runner and stores the supplied profile name.
Parameters:
profile: source of the event coreprofileName: name stored in the event payload