Treemod Conflict
kittyclaus opened this issue ยท 5 comments
When using stargate in conjunction with Cristichis Tree Capitator, it is easy to destroy the Wooden portals even when they don't have perms to modify the portal.
A player on my server with only base perms accidentally destroyed a nexus portal with this tree-felling plugin.
When the portal got destroyed, did it show any message?
Cristichis Tree Capitator
might have an api, or use an api to determine block protection. I think for both alternatives, this needs to be put in an addon. If that is not the case, then it will not be possible to fix
Stargates are protected by listening to events that might change a Stargate's blocks, such as the BlockBreakEvent event. If the tree feller plugin doesn't trigger such an event, I'd say that's a bug in the tree feller plugin, not in Stargate.
Yes, I agree. Although: if a message showed up, then that means the event registered to spigot (that's why I asked)
I read the code, and from what I can see, the problem is that the Cristichis Tree Capitator plugin is badly coded. It has a specific check for whether a block is protected by WorldGuard, but does not fire any events other plugins might listen to. The particular plugin seems to bypass protection by every plugin except WorldGuard, as long as the initial block is unprotected.
If the portal was actually disabled, however, we'd probably need to check if something weird is going on.
The tree plugin uses https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Block.html#breakNaturally() to break the tree's blocks; that method doesn't appear to trigger any events that we could cancel.
For that reason, going to merge this into issue #208