setLevel

abstract fun setLevel(player: Player, trackId: Key, level: Int): Boolean(source)

Sets level with 0 experience within the level on the trackId. The level is clamped to LevelProgress.minLevel and LevelProgress.maxLevel. Whether the player gets the plugin's level-up rewards (skill points, unlocks, messages) for skipped levels depends on the plugin. Lowering the level may not take rewards back.

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.