Hooks

A plugin can register a callback function if he want to block it, or just wants to be notified that it occured. For that WorldEdit has some hooks build in. Here you can find a list of hooks that you can register.

Hooks can be registered by calling WorldEdit with cPluginManager:CallPlugin. An example:

cPluginManager:CallPlugin("WorldEdit", "AddHook", "OnAreaChanged", "MyPluginName", "MyCallbackName");

Hook name Called when
OnAreaChanged After a change has already occured in the world.
OnAreaChanging When a change is occuring in the world.
OnPlayerSelectionChanging When a player or other plugin tries to change the selection of a player.
OnPlayerSelectionChanged When a player or other plugin changed the selection of a player.
OnAreaCopied After a player copied an area using //copy
OnAreaCopying When a player tries to copy an area.