From aa11dbb928f6a0f6e298876beab655c2634c9b91 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 20 Feb 2018 13:50:23 +0000 Subject: [PATCH] Player: Add warnings for messing with movement checks --- src/pocketmine/Player.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 7a51f1196..1e681320e 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1468,6 +1468,16 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $revert = false; if(($distanceSquared / ($tickDiff ** 2)) > 100){ + /* !!! BEWARE YE WHO ENTER HERE !!! + * + * This is NOT an anti-cheat check. It is a safety check. + * Without it hackers can teleport with freedom on their own and cause lots of undesirable behaviour, like + * freezes, lag spikes and memory exhaustion due to sync chunk loading and collision checks across large distances. + * Not only that, but high-latency players can trigger such behaviour innocently. + * + * If you must tamper with this code, be aware that this can cause very nasty results. Do not waste our time + * asking for help if you suffer the consequences of messing with this. + */ $this->server->getLogger()->warning($this->getName() . " moved too fast, reverting movement"); $this->server->getLogger()->debug("Old position: " . $this->asVector3() . ", new position: " . $this->newPosition); $revert = true;