Guys, can you please give me best way to make good anti fly anticheat? I have lot of tries to make working anti-fly anticheat, but biggest problem for me is jumping :/ I don't know how to make anticheat check when player is not on ground , but don't jump.. I tried checking only if player's air tick is higher than 3 blocks (To prevent kicking when jump), but hackers just jump and enable fly and don't get kicked Please give me tips how to check if player is not on ground, but don't jumped Thanks
well you check using a task if the player is near the ground say every 30 second you check if all player's beneath weather if there's a solid block exist within 5 blocks if there are none add suspicious tick if any player get it too high, you can simply pull it down to ground(like get the nearest solid block based on Y and tp them there) OR revert it by storing a valid pos on scanning honestly there's like 1000 ways for a simple question and if anyone got any better ways please do share it
I'm pretty sure pocketmine's built in anti cheat checks whether the player is on ground. You can check if an entity is on ground by calling Entity::isOnGround(), which is more precise than Level::getBlockIdAt($x, $y - 1, $z)] !== Block::AIR.
Although adding Anti-Flying "Hacks" is wanted, I would suggest not adding it. I've seen many cases where these "Anti Cheat" plugins cause more trouble than they are worth. Most of the time, it ends up kicking people just for jumping from a block at y+2, to the floor (y). If someone is to make this, they should make it advanced.
agreed pretty much why i said pull them down instead of kicking and 5 blocks instead of 2 just for occasional glitch etc also dont forget to count falling and climbing