12-27-2013, 01:50 AM
This callback idea might not be bad either, not only for these plugins, but for others, too. Might be interesting to implement both and see which one is easier to use 
I'd say have the callback unlimited by area, maybe only by world, and called not for each block change, but for the entire selection:

I'd say have the callback unlimited by area, maybe only by world, and called not for each block change, but for the entire selection:
-- Register the callback for a_World
cPluginManager.Get():GetPlugin("WorldEdit"):Call("RegisterCallback", "WECallback", a_World);
-- The callback
function WECallback(a_MinX, a_MaxX, a_MinY, a_MaxY, a_MinZ, a_MaxZ, a_Player, a_World, a_Operation)
-- Prevent the user from pasting in X < 0
if ((a_MaxX < 0) and (a_Operation == "paste")) then
return false, "Prevented by an example WE callback"; -- prevent and give the user a reason that WE displays
end
return true; -- allow
end

