ExoticGarden
ExoticGarden copied to clipboard
Destroy message in residence
Description (Required)
During any right-click interaction in the area protected by the residence, ExoticGarden will cause a message regarding the permission to destroy.
Note: This is a clean server where plugins were only installed and nothing was set up. (except creating a residence in the game)
It does not write after removing ExoticGarden.
https://github.com/Zrips/Residence/issues/575 https://github.com/Zrips/Residence/issues/683
According to Zrips, the problem is somewhere in this

Steps to reproduce the Issue (Required)
Install ExoticGarden, Residence, Slimefun, Vault on the server. One player creates a residence, the other player right-clicks in the residence area. Another player always gets a message about missing permission to destroy. Video: https://youtu.be/dndnuy7g_ck
Expected behavior (Required)
The missing destroy permission message will not be displayed when interacting with the right click.
Server Log / Error Report
Log: https://pastebin.com/uVjZckNj
Environment (Required)

I think that this issue is really important and I'll be glad too if it could be fixed. Zrips tried to make better integration to Slimefun, but now it's up to you to improve this from ExoticGarden point of view to stop this destroy spam.
Zrips also suggested solution but he doesn't have time due to his plugins to implement it here on his own, so maybe someone of you could try it. He thinks that some precheck for existing bush would resolve unnecessary event fires. There's missing methods for basic check if block is valid for harvesting, so that one should be probably made too.
Easy fix, that permission check should just be moved into the item != null check. It's checking permission BEFORE checking if there's a plant actually there (also needs to handle the else case)
(FYI, Zrips if you read this - this is open source, no need to decompile :p )
Edit: will PR in a little bit if I get a chance
Thanks Walshy.
Can you try to fix it? Players mind this spam in their chat