What the title says, currently it sounds like it's getting the experience level of the target (in the case of PlayerEntity, this can be confusing), whereas getDroppedExperience or something similar shows that it gets the amount of exp that should drop on death.
I personally suggest getExperienceToDrop