ExoticGarden icon indicating copy to clipboard operation
ExoticGarden copied to clipboard

Destroy message in residence

Open 100petr opened this issue 4 years ago • 4 comments
trafficstars

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 image

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)

image

100petr avatar Mar 17 '21 11:03 100petr

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.

bobhenl avatar Mar 18 '21 17:03 bobhenl

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

WalshyDev avatar Mar 18 '21 18:03 WalshyDev

Thanks Walshy.

bobhenl avatar Mar 19 '21 22:03 bobhenl

Can you try to fix it? Players mind this spam in their chat

100petr avatar Jun 08 '22 18:06 100petr