Saving XP when shutting down server.

Discussion in 'Archived: Plugin Requests' started by Eymas, Nov 28, 2011.

  1. 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?
  2. Isn't this just a Bukkit bug?
  3. Offline


    A simple plugin could do this with a database
  4. Offline


    Sounds like it..
    FlamingArmor likes this.
  5. I use a developmental build; Not sure what one; I'll check later on.
  6. Offline


    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);

Share This Page