How do I reset all data (achievements and items) of my players

Discussion in 'Plugin Development' started by SenTendo, Jul 28, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    SenTendo

    So, I want to reset ALL data for the achievements and items in their inventory.
    Thanks SenTendo


    play.kingsnecraft.com
     
  2. Offline

    macboinc

    Clear items in inventory by player.getInventory().clear();
     
  3. @SenTendo delete all playerfiles and restart the server xD
     
  4. Offline

    teej107

    Or have the player log off, then delete the dat file. No restart necessary.

    @SenTendo You may need to look at the JavaDocs but the Player may have a Collection containing the achievements which you can just clear.
     
  5. @SenTendo @teej107 well this was meant like a joke :O don't delete the playerfiles, because this will delete evrey data you got about the player. like uuid, current location, home etc... This really shouldn't be your way to go, except for you want the player to compleatly start over again. I once read a thread where somebody managed to remove single achievements from certain players and how to clear an inventory you already got told. if you can remove one, you surely can remove all :) go search for it
     
    teej107 likes this.
Thread Status:
Not open for further replies.

Share This Page