This already exists: https://github.com/Exxarion/WorldGM. It needs updated (or at least the API bumped), but it exsists.
He don't work : [Tesseract] [20:22:09] CRITICAL> "Impossible de passer l’événement 'pocketmine\event\player\PlayerQuitEvent' de 'WorldGM v9': Argument 1 passed to pocketmine\Player::setGamemode() must be of the type integer, null given, called in /home/eradiamcpe/eradia_server/plugins/WorldGM-master/src/WorldGM/WorldGM.php on line 120 sur WorldGM\PlayerEventListener" [Tesseract] [20:22:09] CRITICAL> TypeError: "Argument 1 passed to pocketmine\Player::setGamemode() must be of the type integer, null given, called in /home/eradiamcpe/eradia_server/plugins/WorldGM-master/src/WorldGM/WorldGM.php on line 120" (EXCEPTION) in "/src/pocketmine/Player" at line 1236
It appears to me that you are using Tesseract. We do not support Tesseract. Plus like I said, that plugin would have at least needed it's API bumped.
If you want upgrade to PocketMine-MP your plugin might work or you can try WorldProtect Which has per-world GameModes build in and many other features.
Hello, there is a function for changing PlayerGamemode, so you can just set it to special world, and you can setup in what ever world you want