So what if a Singapore Navy ship caught some pirates and shipped them back to Changi. They could then be tried and given the rope.
Completely legal. Nothing to stop any other country doing the same. The Chinese don't give stuff about about pathetic UN conventions.