FJsMacros.EventAndContext
com.jsmacrosce.jsmacros.core.library.impl.FJsMacros.EventAndContext
Pairs an event received by waitForEvent with its event container.
js
const next = JsMacros.waitForEvent("Tick");
try {
Chat.log(next.event.getEventName());
} finally {
next.context.releaseLock();
}Release the context lock promptly after processing when the returned event is held; the result is not necessarily currently locked.
Type Parameters
E: paired event type
Nested type declared in JsMacros; not a separate global library.
Constructors
new FJsMacros.EventAndContext
new FJsMacros.EventAndContext(E extends BaseEvent event, EventContainer<?> context)#Stores the supplied event and container references without dispatching or changing lock state.
Parameters:
event: event to paircontext: paired event container; supply a non-null reference fortoString()
Fields
context
The event container paired with
event; release its lock promptly when processing a held event.