This hook is called when a player or other plugin changed his selection .

Callback function

The default name for the callback function is OnPlayerSelectionChanged. It has the following signature:
function OnPlayerSelectionChanged(a_Player, a_PosX, a_PosY, a_PosZ, a_PointNr)


Name Type Notes
Player cPlayer The player who's selection changed
Pos X number The X new coordinate
Pos Y number The Y new coordinate
Pos Z number The Z new coordinate
Point Nr number The point that is changing (point 1 or point 2)

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.

Code examples

Registering the callback

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