this was a pirate settlement at the beginning of the qing dynasty