I run a survival server and want to have this simple feature; Since i shut down the server everyday because of night the XP of players revert to 0. Is it possible to save the XP to the player.dat files?
You don't need a database, just a yml file would do. Just create a key in the yml file when they log in (if it isn't there already). Then get their experience when they log out, save it to the username key, and the next time they log on use Player.setExperience(int xp);