public function __construct(Player $player, $newGamemode) { $this->player = $player; $this->gamemode = (int) $newGamemode; }