Un-Binds a function handler from an event.
bool Event.unbind(string eventName, function handler)
NOTE: Anonymous handlers cannot be unbound
bool - true if the event was successfully unbound, false if something went wrong.
function myOnServerStart() Logger.info("Server started!") end Event.bind("onServerInit", myOnServerStart) -- bind a handler -- Lets remove it now Event.unbind("onServerInit", myOnServerStart) Event.bind("onServerInit", function() -- bind an anonymous function Logger.info("The server init event was triggered!") end)
There was an error while loading. Please reload this page.