When using experience in my server, I noticed that xp gets - what seems like - reset everytime a player dies. Weird thing is though, that the player doesn't actually lose it's xp. Event keep inventory is set to true. When leaving the game and re-joining, all the experience seems to be back again.
What I expected to happen, was the XP remaining when dying.
Experience is not yet implemented. This issue is invalid.
@dktapps -> Had that issue when writing exp dropping in clearsky, the old spoon version.
The attributes are getting reset, i just reproduced it. The exp attribute should not be reset when the keepinventory is set to true, but the attribute reset is called later (whilest respawning). (also probably addExperience, he might use API methods and plugins)
I repeat:
Experience is not yet implemented.
@Sandertv what you could actually do is coding into your plugin that it saves the exp attribute on death and regives it on respawn using PlayerDeathEvent and PlayerSpawn/Respawn event.
@dktapps https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/entity/Human.php#L235-L271