def getPlayerGameType(self, player="Player"):
        '''
        Gets the Gamemode of the specified player
        
        :param player: The UUID of the player
        :type player: str
        :return: The Gamemode number
        :rtype: int
        '''
        if player == "Player":
            return self.GameType
        else:
            playerTag = self.getPlayerTag(player)
            return playerTag["playerGameType"].value

        Gets the Gamemode of the specified player
        
        :param player: The UUID of the player
        :type player: str
        :return: The Gamemode number
        :rtype: int
        
pymclevel/infiniteworld.py