setLevel

open fun setLevel(player: Player, @KeyPattern.Value trackId: String, level: Int): Boolean(source)

Sets level with 0 experience within the level on the trackId. Mimic clamps level to LevelProgress.minLevel and LevelProgress.maxLevel before calling this method. If your plugin can give its level-up rewards for skipped levels, do it. Otherwise, just set the level.

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.