Save kills in Config

Discussion in 'Plugin Development' started by sacha220899, Jun 15, 2014.

Thread Status:
Not open for further replies.
  1. Hi,
    I want to save the kills of all the players in a config file. So the plugin should create a file named "Kills" and there, the name and the amount of kills of the player should be written.
    So like this:
    Steve:
    - 15
    Herobrine:
    - 1499
    etc.
    Pls help me
     
  2. Offline

    amhokies

  3. Offline

    Konkz

    Well... googling around will help you. Seen like 100 threads about it and like 5 videos + 5 written tutorials and the JavaDocs.
     
  4. Offline

    xepisolonxx

    Check @Pogostick29dev bukkit coding tutorials on saving hashmaps. It's basically you save a string witch will be the players uuid and save the intended of kills along with it
     
  5. Konkz amhokies
    I know how to create the file, but don't know how to get the kills...
     
  6. Offline

    amhokies

    Listen for the PlayerDeathEvent, check to see if the killer is a player, if it is, get the killer's uuid, and then retreive current kills from the file, add one, then restore the new value in the config.
     
Thread Status:
Not open for further replies.

Share This Page