takeExp

open fun takeExp(player: Player, @KeyPattern.Value trackId: String, amount: Double): Boolean(source)

Takes experience amount on the trackId, lowering levels down to LevelProgress.minLevel if needed. Emulate it as compute-then-set if the plugin can't lower levels natively.

Return

true if the change was requested, false if it is unsupported for this player and trackId, or the player's data isn't loaded. Return true even if the plugin may cancel the change through its events.

Parameters

amount

Non-negative amount of experience.