Z0rdak / Yet-Another-World-Protector

Yet Another World Protector is a server-side protection mod which allows you to protect your creations against various different events/actions of players, mobs and the environment. It was inspired by the forge mod WorldProtector and the WorldGuard plugin.
https://www.curseforge.com/minecraft/mc-mods/yawp
GNU Affero General Public License v3.0
19 stars 8 forks source link

Place-Block flag also prevents using items on blocks #109

Open Z3R0TR0N opened 2 months ago

Z3R0TR0N commented 2 months ago

Hi,

We've had complaints that adding the "place-block" flag to a region also prevents players from using items on blocks, which is a different flag entirely. I've confirmed this by being unable to place a written book back into its lectern. The region in question has the following flags:

However, we'd like players to be able to place books back into lecterns (they can remove books, but not replace them), and to add dyes & glow ink to signs (for our mailboxes). We've also had complaints that trying to open containers (i.e., barrels) while holding a tool or item (e.g., a sword) in the player's main hand also doesn't work. The place-block flag alert likewise appears and denies this action.

My understanding is this should only be prevented by the use-items flag, which is not present, nor is it present in any parent / dimensional regions. Is place-blocks meant to prevent using items on blocks, or is this a bug?

We use Fabric 0.15.10 for Minecraft 1.20.4, with YAWP 0.0.2.9-Beta3-Fabric.

Z0rdak commented 2 months ago

We've had complaints that adding the "place-block" flag to a region also prevents players from using items on blocks, which is a different flag entirely.

This should not happen at all. Its not the intended behaviour.

At first this sounds like an issue with the vanilla server spawn protection. Since the region is named spawn its possible that the region is at the same location as the vanilla spawn protection.

Please try to disable the vanilla spawn protection first and check it again and report back. If the issue still exists, I am more than happy to take a look into it.

Best regards

Z0rdak commented 2 months ago

So I've investigated this issue. It's a "bug". It should not be that way and affects any fabric version.

I'll see how to fix it in the next days and publish a fix.

Z3R0TR0N commented 1 week ago

Hi,

Just wanted to provide an update to your suggested fix. You were correct— the vanilla spawn protections were interfering with YAWP, so turning off the YAWP protection and sticking to vanilla protections worked fine. Thank you! Best of luck resolving this bug, however!

Z0rdak commented 1 week ago

Thanks for the update. I’ll let you know when it is fixed by closing this issue. best regards