takeExp

abstract fun takeExp(player: Player, trackId: Key, amount: Double): Boolean(source)

Takes experience amount on the trackId, lowering levels down to LevelProgress.minLevel if needed.

Return

true if the change was requested, false if it is unsupported or the player's data isn't loaded. true doesn't guarantee the change: another plugin may cancel it, and Mimic can't detect that.

Parameters

amount

Non-negative amount of experience.

Throws

if amount is negative or not finite.