Appearance
K.Hooks
Functions
K.Hooks.new
lua
K.Hooks.new(name: string, operation: ((Context) -> boolean?)?): HooksK.Hooks(name, operation) is the same as K.Hooks.new(name, operation).
Methods on hooks
hooks:Before
lua
hooks:Before(callback: (any) -> (), priority: number?): () -> ()hooks:After
lua
hooks:After(callback: (any) -> ()): () -> ()hooks:Use
lua
hooks:Use(callback: (any, () -> ()) -> (), priority: number?): () -> ()hooks:Override
lua
hooks:Override(callback: (any) -> boolean?)Replaces the operation. Return false (or ctx:Cancel) to fail.
hooks:Run
lua
hooks:Run(ctx: Context?): (boolean, Context)Runs the operation with ctx (a table you fill). Returns (succeeded, ctx); when it fails, ctx.Reason says why if a hook gave one.
Generated from
src/Corode/Hooks.luau.
