Solved Saving player kills and xp

Discussion in 'Plugin Development' started by idkG0D, Feb 6, 2019.

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

    idkG0D

    I want to save the player kill, xp, death, level to a .yml file... So, I did it,
    BUT...
    When a player kill another player, he won 10xp, how can i add this xp to the other xp? Like as... If in the YML file this player have 10xp, i want to add more 10xp, how can i do that?
     
  2. Online

    timtower Administrator Administrator Moderator

    @idkG0D Get the xp, add 10, set the xp
     
    KarimAKL likes this.
  3. Offline

    Mathias Eklund

    getConfig().get(path);
    getConfig().set(path, newValue);

    This is basically how it's done.
     
  4. Offline

    Tango_

    Don't forget to save config
     
    KarimAKL likes this.
Thread Status:
Not open for further replies.

Share This Page