giveExp

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

Gives exactly amount experience on the trackId, ignoring boosters, party sharing and other bonuses the plugin applies to experience earned in-game. Some plugins always apply their boosters, so the player may get more. The plugin's level-up rewards and messages still work as usual.

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.