Event

A hook for a certain event in Minecraft
You may register functions to one,
and those functions will be called when the event occurs

Event.remove

Removes either a function from this event or when given a string, remove all functions registered under that name
Returns the number of functions that were removed
overload 1:
Event:remove(name)
Method Property Fluent Description Representation
name accepts a String
Return Value an Integer

Event.clear

Clears the given event of all its functions
overload 1:
Event:clear()
Method Property Fluent Description Representation
Return Value nil

Event.register

Register a function on this event
Functions are run in registration order
An optional string argument can be given,
grouping functions under that name, for an easier management later on
overload 1:
Event:register(func)
Method Property Fluent Description Representation
func accepts a function
Return Value nil
overload 2:
Event:register(func, name)
Method Property Fluent Description Representation
func accepts a function
name accepts a String
Return Value nil

Event.runOnce

figura.docs.event.run_once
overload 1:
Event:runOnce(predicate, toRun)
Method Property Fluent Description Representation
predicate accepts a function
toRun accepts a function
Return Value nil
a a