Handler

interface Handler

Bootstrap-resident handler interface.

Pure JDK signature — it must resolve identically on bootstrap and on the game loader.

Every method defaults to a no-op: a patch key belongs to exactly ONE phase (the key carries a sequence number, so no two patches share one), and the implementation registered under it only ever receives that phase's callback. Defaulting keeps a single interface and a single registry rather than splitting the bridge four ways.

Functions

Link copied to clipboard
open fun onEnter(key: String, self: Any, args: Array<Any>)
Entry phase: the patched method was just entered, before its body runs.
Link copied to clipboard
open fun onExit(key: String, self: Any, args: Array<Any>, returned: Any, thrown: Throwable)
Exit phase: the patched method is leaving, by return or by throw.
Link copied to clipboard
open fun onIntercept(key: String, sig: MethodType, self: Any, args: Array<Any>): Any
Head-side decision, before the body runs.
Link copied to clipboard
open fun onModify(key: String, sig: MethodType, self: Any, args: Array<Any>, returned: Any, thrown: Throwable): Any
Return-side decision, after the body ran.