I'm attempting to remove XP from a player using player.addExperience(-1) (player being an EntityPlayer), however it doesn't quite work properly. When XP reaches below the current level, the XP bar begins to stay empty, and the level stays the same.
I've also tried player.experienceTotal = player.experienceTotal - 1; with no luck.\
Anybody have any suggestions for removing XP from the player?