What do you mean when you say you got hacked? Player and World files are saved locally, so unless someone had physical access to your files (which is very unlikely, and if they did, then your Terraria files should be the very least of your problems at that stage), I fail to see how you could've lost any items. Unless multiplayer works fundamentally different to singleplayer in a way I'm not aware of (I play multiplayer sporadically at best, so I wouldn't know).
All I can recommend is that in future, you regularly back up your World and Player files. I do it after every play session, I can very much recommend the same to you.