Yeah, sorry about that, my changes broke it. Gonna fix the hook tonight.
We need to create some kind of an API bridge between WorldEdit and the protection plugins, ProtectionAreas and Gallery. Right now players with WorldEdit rights can "vandalize" those protected areas without any restriction.
I've added an issue in the WE issue tracker.
Maybe just something really simple like registercallback(callbackname, area) for WE, which calls the interplugin functin when a block in that area is changed.
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:
-- 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
Maybe do return true to block the interaction to match the MCServer API?
Yeah, and the registration needs either "this plugin" or at least "this plugin's name", so that WE knows which plugin to call. I'll edit the example and copy it to the GitHub issue.
I implented it. It works exact the same as you noted.
How about we move the WorldEdit repo to the mc-server organization? I think it would deserve that

Also, you should pick a license for the sources.