/freeze <PlayerName> - Freezes Them If Ran 1st Time
/freeze <PlayerName> - Unfreezes Them If Ran 2nd Time
Will Also Put Them In adventure to stop them breaking blocks then after unfreezing will put them back in survival.
Running /freeze without a player name will display a massive long error in the console. And if you run /freeze with a player that is not online then that will also display an error saying
[{TIME}] [Server thread/WARN] []: java.lang.NullPointerException
This is all in the console so you don't have to worry about it appearing in chat.
If Frozen In Mid air they will stay in mid air. Also note they will still be able to run commands. So they may be able to go to spawn and other places like that.