WorldEdit
#51
Yeah, sorry about that, my changes broke it. Gonna fix the hook tonight.
Reply
Thanks given by: NiLSPACE
#52
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.
Reply
Thanks given by:
#53
Maybe just something really simple like registercallback(callbackname, area) for WE, which calls the interplugin functin when a block in that area is changed.
Reply
Thanks given by:
#54
we already talked a bit about how to implent it in the issue tracker: https://github.com/STRWarrior/WorldEdit/issues/4
Reply
Thanks given by:
#55
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 Smile
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
Reply
Thanks given by:
#56
Maybe do return true to block the interaction to match the MCServer API?
Reply
Thanks given by:
#57
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.
Reply
Thanks given by: NiLSPACE
#58
I implented it. It works exact the same as you noted.
Reply
Thanks given by: xoft
#59
I created a little spawn protect plugin that blocks WorldEdit actions in the spawn. It has the same configuration as the spawn protect from the core plugin. https://github.com/STRWarrior/WE-SpawnProtect
Reply
Thanks given by:
#60
How about we move the WorldEdit repo to the mc-server organization? I think it would deserve that Smile Also, you should pick a license for the sources.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)