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 an Event
overload 2:
Event:register(func, name)
Method Property Fluent Description Representation
func accepts a function
name accepts a String
Return Value an Event

Event.getRegisteredCount

Returns the number of functions that are registered with the given name
overload 1:
Event:getRegisteredCount(name)
Method Property Fluent Description Representation
name accepts a String
Return Value an Integer
a a