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
register(fn,string)
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
Example:
events.TICK:register(function() end, "Name")
clear()
Clears the given event of all its functions
Example:
events.TICK:clear()
remove(string or fn)
Removes either a function from this event, or when given a string, remove all functions registred under that name
Returns the number of functions that were removed
Example:
events.TICK:remove("Name")
getRegisteredCount(string)
Returns a number of how many functions is registered by this name
Example:
events.TICK:getRegisteredCount("Name")