garbagemule / MobArena

MobArena plugin for Minecraft
GNU General Public License v3.0
196 stars 151 forks source link

Built-In Anti-Cheat Toggle #509

Closed SoraShiunin closed 5 years ago

SoraShiunin commented 5 years ago

Feature request

Short description

Option in config to disable the built-in anti-cheat of mobarena.

Implementation details

Could be a global option to toggle the anti-cheat(preferable and easier) or a per-arena toggle. It helps alot with the compatibility with certain plugins that give Powers such as flight and such and has it as a main gameplay feature of the server and is included in mobarenas.

garbagemule commented 5 years ago

MobArena doesn't have a centralized concept of anti-cheat, so it doesn't make sense to talk about disabling "it". Way back when MobArena was first launched, its only protective measures revolved around the arena structure, and that was mostly because I found it harder to learn WorldGuard than to just implement some form of region protection myself (the region was already there for monster containment).

Now, for this issue to ever get anywhere, we need to explore MobArena's protective measures (I won't call it anti-cheat, because not all of them have to do with cheating). Let's break it down into in-session and out-of-session categories, as well as a category for the transition phase (lobby):

In-session During an arena session, MobArena tries to keep track of the players and monsters that it manages and manipulates:

Out-of-session When an arena isn't running, MobArena tries to lock down the arena region so it stays clean for the next session. Not a lot happens outside sessions:

Transition phase (lobby) The glue that binds the two states together is the transition phase leading up to a session starting, i.e. the join/leave procedure and the lobby. Let's start with the steps of the join/leave procedure:

All of these steps are hardcoded and there is no way to manipulate them. On death/leave, the procedure is reverted by playing it back in reverse to make sure everything happens in the right (inverse) order. For the longest time, there were inconsistencies in the procedure that resulted in a lot of different kinds of inventory bugs. That's no longer the case because the procedure is well-defined and predictable. It does lock things down, though.

In the lobby, players are protected from damage and can't build or break blocks.

In the arena, upon dying/leaving, the player's inventory and cursor are cleared to prevent them from bringing arena items out of the arena.

Finally, with the addition of the join interrupt timer setting in the config-file, it is possible to prevent players from exploiting MobArena's ease-of-joining as a way to escape PvP or other tough situations.

Summary Of all the protective measures and steps MobArena takes with players and monsters, only the following can be classified as anti-cheat:

If using MobArena to exploit bugs, glitches, incompatibilities is also considered cheating, we can add the following:

The rest are essentially just "good form" in the spirit of making the minigame an isolated experience that doesn't interfere with the outside game world.

So with all of this in mind, does it make sense to talk about "disabling the built-in anti-cheat"?

SoraShiunin commented 5 years ago

I generalized but mostly I do mostly mean the anti-flight, yes, as it keeps un-flying the player. A toggle to turn that off would be great to improve compatibility with any plugin that would add gliding, flight and other things related like hooks that would use the flight flag.

I do consider anything that doesn't interact with the "player VS mob" directly more of an anti-exploit, such as the player leaving the arena area.

SaitDev commented 5 years ago

Just my opinion, allow flying while fighting pure vanilla mobs would be so OP unless your arena is fullfill with bosses that have skills / wither / ender dragon :thinking: