This has been a recent problem for me. I accidentally did tpa all, (sometimes it just does that to me so it would be nice to know the command if someone would please tell me) and alot of people accepted. One girl threw a book at me and I picked it up. I could not move and could not type. My Minecraft stopped responding, so I closed Minecraft. I tried going back on and the book made me lag so hard, my Minecraft crashed. Then, when the server restarted the inventories were also cleared, so I was able to play again.