This hook is called when a player or other plugin tries to change the selection of a player.

Callback function

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


Name Type Notes
Player cPlayer The player who's selection is changing
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, and the event is blocked.

Code examples

Registering the callback

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