ToolBelt

9.6k Downloads

Tools not respecting Region Protections

BraveThunder opened this issue ยท 4 comments

commented

When using the tools within a 'protected' region created with WorldGuard certain tools do not obey the protections from WorldGuard.
Details:
-useEvent is set to true in config.yml
-Block breaking/placing is prevented successfully by vanilla methods, i.e. breaking with fist/attempting to place blocks
-Data Scrolling, Paintbrush, Sledge and Pliers are prevented by WorldGuard successfully
-Pickhax, Shovel and Chainsaw will destroy blocks irrespective of whatever WorldGuard build/break flags are in place to stop them
-Plugin versions: WorldGuard v5.5.2, ToolBelt v0.3
-Bukkit build: 1.2.5-R1.0
-I am not using permissions for either plugin

Let me know if you require any further information that might be helpful.

commented

I'll see what I can do.

commented

Still investigating this. Sorry for taking so long, I have been busy with stuff recently. This problem has been bothering me because I have yet to understand the core cause. The issue is actually solved in commit 9765bfd, but I'm trying to figure out why.

The big difference between the tools that obey permissions for you and the ones that don't is the use of SafeReplace(). The paintbrush, sledge and such have the ability to (re)place blocks, the pickhax, shovel and chainsaw can only delete blocks. Through testing I found that the above commit solved the issue, but I have yet to determine the cause.

In that commit I changed how the global data is passed into different tools. This should have had no effect on the use of any of the tools at all, and yet it appears to do so. I'm not closing this case until I understand why, but you should be able to safely use the below build to solve the issue.
http://dl.dropbox.com/u/71355/ToolBelt_9765bfd.jar

commented

Just tested the build and everything worked as I wanted. Thank you for this (if only temporary) fix. I hope you manage to find the root of the issue, alas I feel I can be of little assistance as my knowledge of how plugins and bukkit actually work internally is extremely limited. Good luck all the same and thanks.

commented

Still not entirely sure what the difference is that fixed this, but I just confirmed that the issure is still resolved in ToolBelt release 0.4