12-13-2013, 07:41 PM
Yeah, sorry about that, my changes broke it. Gonna fix the hook tonight.
WorldEdit
|
12-13-2013, 07:41 PM
Yeah, sorry about that, my changes broke it. Gonna fix the hook tonight.
Thanks given by: NiLSPACE
12-26-2013, 08:32 PM
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.
12-27-2013, 12:43 AM
Maybe just something really simple like registercallback(callbackname, area) for WE, which calls the interplugin functin when a block in that area is changed.
12-27-2013, 12:47 AM
we already talked a bit about how to implent it in the issue tracker: https://github.com/STRWarrior/WorldEdit/issues/4
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: -- 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
12-27-2013, 01:54 AM
Maybe do return true to block the interaction to match the MCServer API?
12-27-2013, 02:08 AM
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.
Thanks given by: NiLSPACE
12-27-2013, 02:23 AM
I implented it. It works exact the same as you noted.
Thanks given by: xoft
12-28-2013, 08:43 AM
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
12-30-2013, 06:22 AM
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.
|
« Next Oldest | Next Newest »
|