This function pack allows you to convert a selected player’s score from a specified scoreboard objective into XP levels.
Contributors
This work is licensed under the MIT License.
Usage Commands
/tag <target> add wiki:score_to_xp_level
Enables score-to-XP level conversion for the selected target.
/playsound random.wiki.levelup
This pack mutes the random.levelup sound to prevent undesired sound effects from playing during the conversion. If you wish to use the level-up sound effect elsewhere in your project, you can use the random.wiki.levelup sound ID instead.
Editable Files
functions/wiki/scoreboard/players/score_to_xp_level.mcfunction
- In this file,
wiki:n.mainis the objective where the required scoreboard data is stored, andwiki:n.tempis the temporary objective used to convert scores fromwiki:n.maininto XP levels for the selected players. - You can rename
wiki:n.mainto match the name of your desired objective. - Alternatively, if your text/code editor has a search-and-replace feature, you can replace all instances of
wiki:n.with your desired objective name. For example, replacing it withwiki:money.will generatewiki:money.mainandwiki:money.temp. - You can also replace the
wiki:namespace with your project's namespace if needed.