addTrueExperience

fun Player.addTrueExperience(exp: Int)

Change a Player's experience.

This method is preferred over Player.giveExp.

In older versions the method does not take differences in exp per level into account. This leads to overlevelling when granting players large amounts of experience.

In modern versions, while differing amounts of experience per level are accounted for, the approach used is loop-heavy and requires an excessive number of calculations, which makes it quite slow.

Parameters

exp

the amount of experience to add or remove