Placing player shops conflicts with Matrix Anti Cheat plugin
benwoo1110 opened this issue ยท 5 comments
Preliminaries:
- Shopkeepers version:
2.9.2
- Spigot version:
git-Paper-132 (MC: 1.15.2)
- Matrix AC version:
4.3.5
- I have checked that my issue/question does not get answered by:
- The documentation.
- The FAQ.
- The Known Issues.
- I have checked all open and closed issues, but none seems to fit my issue/question.
Reproduction on a fresh and up-to-date Spigot server:
I was have not tried
to reproduce my issue on a freshly setup, with no other plugins and with no kinds of other server or client mods. However, I can confirm that I have tried disabling the conflicting plugin (Matrix AC) to investigate the issue.
The issue:
When Matrix Anti Cheat check for "interact" which basically checks for illegal interaction with entities/blocks, is enabled, I am unable to place down a player shop on any blocks other than the chest itself. It will give the message "you do not have access to the chest." If I click multiple times, I will then get a Anti-Cheat warning from matrix that "I tried to illegally interact with Entity/Block (Interact)".
After seeing this, I disable the Matrix Anti-Cheat for 'interact' and i was able to place down the player shops without any issue. I am not sure if you will be able to fix this issue, but I think you can put it in 'known bugs' page to alert people regarding this conflict. Thanks!
Matrix anti-cheat: https://www.spigotmc.org/resources/matrix-anticheat-advanced-cheat-detection-1-8-1-12-1-13-1-14-1-15-50k-download.64635/
My guess is that the issue might be related to how the Shopkeepers plugin checks if the player can access the chest: Shopkeepers triggers a fake interact event for the player on the selected chest to figure out if some other plugin cancels the event (and thereby denies the player access to the chest).
The anti-cheat plugin might interpret this like a regular player interaction and check if the player is in range, and/or looking at the 'clicked' chest, and/or interacting to quickly in a row, etc., and then prevent the interaction.
One workaround could maybe be for them to only handle the event if it's Bukkit's PlayerInteractEvent (i.e. by comparing the event's runtime type, it's package, or similar) and otherwise skip the anti-cheat checks. The benefit of such a workaround would be that neither the Shopkeepers plugin nor that anti-cheat plugin would need to depend on each other / be aware of each other.
Consider reporting this issue to them as well, since they probably know better how their plugin works, what the issue here is and whether this could be a possible workaround.
A note for the Matrix developer: The same situation probably also applies not only for our chest interaction check, but also the entity interaction check, see
The dev for matrix have updated its plugin (version 4.5.5 on their discord), and I can confirm that in my case, the incompatibility is fixed.
Here is a video of it working: https://drive.google.com/file/d/14bYgMDGKUpv5ZsuFf0pMnAqKq8pger32/view?usp=sharing