Basically, before the U.S. entered World War 1, they made Germany promise not to sink merchant and civilian ships. They had to search the ship first and only sink it if there was contraband found aboard the vessel, after allowing the crew and passengers to have safe passage somehow. Previous to that, Germany had been sinking ships left and right, with no prior information that they were military or civilian ships.