handleEvent
public void handleEvent(ScriptHook hook, Event event, LivingEntity directTarget, LivingEntity eventActor)
Invokes the Lua hook function with a lazily-built context table. Creates the Lua VM on the first call.
public void handleEvent(ScriptHook hook, Event event, LivingEntity directTarget, LivingEntity eventActor, boolean tasksOutliveOwner)
Same as handleEvent. With tasksOutliveOwner, every task this hook call schedules outlives retire, and so does every task those tasks' callbacks schedule. Owners use this for the hook that announces their own end (for example a boss's on_death).