Hey I'm in the process of adapting one of my plugins to pocketmine 4.0, but I get this error message: [Server thread/CRITICAL]: TypeError: "pocketmine\player\Player::setGamemode(): Argument #1 ($gm) must be of type pocketmine\player\GameMode, int given, called in C:\Users\----\Desktop\PocketMine\plugins\GameMode\src\gamemode\main.php on line 33" (EXCEPTION) in "pmsrc/src/player/Player" at line 1049 I'm new to 4.0 so i dont know anything about it. - GeistFan
PHP: <?phpuse pocketmine\player\Player;use pocketmine\player\GameMode;/***@var $player Player*/$player->setGamemode(GameMode::SURVIVAL()) All Method in GameMode Class PHP: /** * This doc-block is generated automatically, do not modify it manually. * This must be regenerated whenever registry members are added, removed or changed. * @see build/generate-registry-annotations.php * @generate-registry-docblock * * @method static GameMode ADVENTURE() * @method static GameMode CREATIVE() * @method static GameMode SPECTATOR() * @method static GameMode SURVIVAL() */