Named after Captain COOK , who sighted them in 1770 , the islands became a British protectorate in 1888 .