Peter200lx / ToolBelt

Play Minecraft with a wide assortment of tools at your side.
9 stars 5 forks source link

Tools not respecting Region Protections #12

Closed BraveThunder closed 11 years ago

BraveThunder commented 12 years ago

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.

TheCryoknight commented 12 years ago

I'll see what I can do.

Peter200lx commented 12 years ago

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 9765bfdc, 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

BraveThunder commented 12 years ago

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.

Peter200lx commented 11 years ago

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