BlockProt

BlockProt

17.2k Downloads

[Feature]: Worldguard region blacklist

supermem99 opened this issue ยท 20 comments

commented

Feature description

Hey,
It will be cool if you can add a worldguard support. Some regions player shouldnt lock open containers. Example a global chest. And if you were able to open a global useable chest, you can lock it. Thats bad.
Solution: Add region blacklist.

commented

Below is the Luckperms Extra Context Plugin website I mentioned earlier.

https://github.com/LuckPerms/ExtraContexts

commented

I want to help a little, but I wonder if there should be a link between the World Guard and the BlockProt plugin.

It can be helpful to explain what functions are needed.

commented

To lock in BlockProt, you need the permission of blockprot.lock

Luckperms plugin supports a plug-in called Luckperms Extra Context to make it compatible with WorldGaurd plugin.

Then, there is a way to remove blockpror.look from the privileges of users belonging to a special group when they enter a certain area using this.

commented

Thanks @hoehoetvhss, this seems like a good solution to the example issue described by @supermem99. I will leave this issue open if more in depth control of the functionality between the two plugins is desired.

commented

However, because this is very annoying, it is my opinion to add a box lockable/impossible setting function through BlockProt's GUI.

commented

Hi, sorry for the late response.
How would you imagine a player setting this? Should it be some flag, should the plot/area not be owned by anyone? This could be solved in many different ways. I personally don't use WorldGuard so my knowledge on how it works is pretty limited, I'd love to hear some more details from you/others about how this could be solved.

commented

In my Opinion there are two good options.

  1. You should be able to add a flag to a region. Like "use blockprot"
  2. Add Regions in config for Blacklisting Regions and Worlds
commented

I've decided to implement a flag called allow-blockprot into WorldGuard. Idk how WorldGuard works so could @supermem99 please test this for me?

blockprot-spigot-1.0.0-beta.3-all.zip

commented

@spnda I tested it. i cant open chests with denying the flag

commented

I hope this will fix the problem. Please test it, thank you :D

blockprot-spigot-1.0.0-beta.3-worldguard-all.zip

commented

I tested it, too. It works well as I thought, and there seems to be nothing to modify.

commented

@spnda I tested it. i cant open chests with denying the flag

So it's working as expected? Perfect, I'll push this soon then. Btw, I'm planning on releasing 1.0.0 as soon as 1.18 releases.

commented

No it doesnt work. I cannot open any Chest, if the flag is set to "deny". It tells me, that i havent permission. Im operator with *

With setting it to deny, the chests shouldnt be lockable.

commented

No it doesnt work. I cannot open any Chest, if the flag is set to "deny". It tells me, that i havent permission

I should test it again.

commented

No it doesnt work. I cannot open any Chest, if the flag is set to "deny". It tells me, that i havent permission. Im operator with *

And if it's on "allow", it works fine? I'll see if I can fix that though, thanks for testing it :D

commented

https://youtu.be/sr9xCcaZvDQ

The link above is the video I tested.

"Deny" Not Open
"Allow" Open

commented

it works thanks

commented

https://youtu.be/e3bQTeb3cYs

The link above is the video I tested.

After uploading the test video, I tested it again and it worked normally.

https://youtu.be/YycfCvhQSTg

The link above is the video I tested.

commented

So, I figured out how use WG and WE and I did some more testing and everything seems to work fine. I will update the PR soon and close this issue. Thanks for testing it.

commented

So, I figured out how use WG and WE and I did some more testing and everything seems to work fine. I will update the PR soon and close this issue. Thanks for testing it.

Thank you for introducing a new system.