EngineHub / WorldGuard

🛡️ Protect your Minecraft server and lets players claim areas
https://enginehub.org/worldguard/
Other
819 stars 535 forks source link

Use of bucket/cauldron in high priority region #1870

Closed Denetorn closed 2 years ago

Denetorn commented 2 years ago

WorldEdit Version

7.2.8

WorldGuard Version

7.0.6

Platform Version

Spigot

Confirmations

Bug Description

Unable to use a bucket to fill (water or lava) or empty a cauldron inside a higher priority sub-region. => "Sorry but you can't place that block here."

Glass bottle does work to empty the cauldron.

Expected Behavior

Fill or empty the cauldron.

Reproduction Steps

  1. define a region
  2. define a smaller region inside the first one
  3. set priority of the second one to 1 or more
  4. set flag passthrough of the second one to allow (same with build, block-place, block-break, interact, use, chest-access... tried them all)

Optional WorldGuard-Report

No response

Anything Else?

No response

wizjany commented 2 years ago

step 4 is your issue. there's no bug here.

Denetorn commented 2 years ago

Hello, can you be more explicit? How is that normal that I can use bottle and not bucket? And how to allow bucket? Thanks.

stonar96 commented 2 years ago

How is that normal that I can use bottle and not bucket?

First of all, your reproduction steps are wrong. You just need one region and by default none of the actions are possible (also with your reproduction steps). Allowing the interact flag allows you to fill and empty cauldrons using bottles, as well as emptying cauldrons using buckets. However, filling (right clicking) cauldrons with (full) buckets is of course also considered as block placing and thus it would require additional flags like block-place or build or unprotecting the region.

It also seems like you are misunderstanding the passthrough flag. Yes, setting passthrough to allow for a region removes the default protection of that region. However, it won't override/remove the protection of other regions. The lower priority region is still there and will protect the area. (Unlike other flags, the passthrough flag is not queried by a location, but it is a property of the region itself.)

Denetorn commented 2 years ago

Thank you for the answer. Passthrough was just an example, as I said I also tried with build, block-place, block-break, interact, use... There is no way to allow cauldron filling with a bucket in the sub-region, unless I delete the main region or allow passthrough in the main region (what makes it useless).

stonar96 commented 2 years ago

There is no way to allow cauldron filling with a bucket in the sub-region, unless I delete the main region or allow passthrough in the main region (what makes it useless).

As I have already said, there is a way without touching the main region. Again, filling cauldrons with buckets is also considered as block placing (besides interacting) and thus at least also requires the block-place flag to be allowed. I know that's not what you are looking for. Anyway, there is no issue here. There are innumerable things like that, which aren't possible to achieve with WG because it would require a separate flag. If at all, this issue is a feature request to add such a flag. In fact, there is already an open pull requrest that would resolve this. See #1778.