PseudoKnight / Stargate-Bukkit

Spigot plugin to create and manage networks of Stargates
GNU General Public License v3.0
9 stars 5 forks source link

Stargate and Matrix anti-cheat #2

Open KabanFriends opened 4 years ago

KabanFriends commented 4 years ago

When a player enters a gate, an anti-cheat plugin Matrix detects the teleport movement as cheating. I reported the issue to Matrix, but dev said Stargate uses "wrong way" to teleport. So Matrix devs aren't going to fix the issue. (https://github.com/jiangdashao/Matrix-Issues/issues/923) Since Matrix isn't going to support Stargate, can Stargate support Matrix? And please fix the "wrong way" to teleport which Matrix devs said. There must be more regularly used way to teleport players.

KabanFriends commented 4 years ago

Matrix anti-cheat isn't open source so you can't see how it detects movement, but I think it doesn't trigger teleport movement as cheating IF the plugin used the recommended way to teleport.

PseudoKnight commented 4 years ago

So, that bit of code was last changed by Drakia eight years ago to use the PlayerMoveEvent's new setTo() method at the time. Stargate isn't doing anything crazy here, and many popular plugins modify the move event destination. It shouldn't interfere with a plugin listening to the event on the earliest priority to detect odd player movements.

But I understand detecting cheats is complex and challenging. Unfortunately I currently have no way of knowing why this is a problem for them because they didn't tell us and their source is obfuscated. That's annoying and is making this harder than it should have been. In my experience it's anti-cheat plugins that are far too rigid and a compatibility nightmare, so not communicating doesn't help. It just sounds like they're hostile to other plugins. Quote:

You should be compatbile with Matrix, not Matrix compatible with you.

sigh

But I'm maintaining this project for people like you, so let's see what I can do without breaking something else -- lol. One alternative is to change it to call the teleport in the handler (like it was eight years ago, ironically) instead of letting Spigot call the teleport after all handlers are done. I looked up three other plugins and they seem to teleport on LOW, HIGHEST, and MONITOR priorities. Maybe these approaches are compatible with Matrix? I'm thinking HIGHEST might be best, since this still allows us to cancel entering the portal.