OnAreaChanging
This hook is called when a change is occuring in the world.
Callback function
The default name for the callback function is OnAreaChanging. It has the following signature:function OnAreaChanging(a_AffectedAreaCuboid, a_Player, a_World, a_Operation)
Parameters:
Name | Type | Notes |
---|---|---|
AffectedArea | cCuboid | The area where a change has occured |
Player | cPlayer | The player who caused the change to happen |
World | cWorld | The world where the changed happened |
Operation | string | The name of the operation. (for example superpickaxe, or paste) |
If the plugin returns false or no value, WorldEdit will call other plugins' callbacks for this event. If a plugin returns true, no other callback is called for this event, and the event is blocked.
Code examples
Registering the callback
cPluginManager:CallPlugin("WorldEdit", "AddHook", "OnAreaChanging", "MyPluginName", "MyCallbackName");