How to get the score displayed on death?

Discussion in 'Plugin Development' started by Raizant, Jan 11, 2020.

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

    Raizant

    I knew this score is the total experience collected, however I couldn't find a way to get the experience since the player started playing. Player.getTotalExperience() clear on death, then i cannot use it.
     
  2. Offline

    KarimAKL

    @Raizant I'm not sure if it's saved after death. I found the statistics "DROP" and "DROP_COUNT" but, since they don't have a description in the javadocs, i don't know what exactly they do, you could try testing their values.

    Otherwise, i think you need to save it yourself, which means you can't get the values from before the plugin was saving them.
     
  3. Offline

    Raizant

    Nah, @KarimAKL DROP is almost there, but there is not material exp... Except for Exp Bottles... :/
     
  4. Offline

    CraftCreeper6

    @Raizant
    I suppose you'll have to save it yourself.

    PlayerExpChangeEvent is probably the way to go.
     
Thread Status:
Not open for further replies.

Share This Page