// Autogenerated via generator.py

    import { system, world } from "@minecraft/server";

        const TAG_REWARD_INFO_1 = 'oct_plev_reward_info_1'
		const TAG_REWARD_INFO_5 = 'oct_plev_reward_info_5'
		const TAG_REWARD_INFO_10 = 'oct_plev_reward_info_10'
		const TAG_REWARD_INFO_15 = 'oct_plev_reward_info_15'
		const TAG_REWARD_INFO_20 = 'oct_plev_reward_info_20'
		const TAG_REWARD_INFO_25 = 'oct_plev_reward_info_25'
		const TAG_REWARD_INFO_30 = 'oct_plev_reward_info_30'
		const TAG_REWARD_INFO_40 = 'oct_plev_reward_info_40'
		const TAG_REWARD_INFO_50 = 'oct_plev_reward_info_50'
		const TAG_REWARD_INFO_70 = 'oct_plev_reward_info_70'
		const TAG_REWARD_INFO_100 = 'oct_plev_reward_info_100'

        // Reward available announcement
        function main() {
            for (let player of world.getAllPlayers()) {
                if (player.level >= 1 && !player.hasTag(TAG_REWARD_INFO_1)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.1"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_1); }
			if (player.level >= 5 && !player.hasTag(TAG_REWARD_INFO_5)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.5"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_5); }
			if (player.level >= 10 && !player.hasTag(TAG_REWARD_INFO_10)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.10"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_10); }
			if (player.level >= 15 && !player.hasTag(TAG_REWARD_INFO_15)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.15"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_15); }
			if (player.level >= 20 && !player.hasTag(TAG_REWARD_INFO_20)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.20"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_20); }
			if (player.level >= 25 && !player.hasTag(TAG_REWARD_INFO_25)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.25"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_25); }
			if (player.level >= 30 && !player.hasTag(TAG_REWARD_INFO_30)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.30"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_30); }
			if (player.level >= 40 && !player.hasTag(TAG_REWARD_INFO_40)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.40"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_40); }
			if (player.level >= 50 && !player.hasTag(TAG_REWARD_INFO_50)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.50"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_50); }
			if (player.level >= 70 && !player.hasTag(TAG_REWARD_INFO_70)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.70"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_70); }
			if (player.level >= 100 && !player.hasTag(TAG_REWARD_INFO_100)) { player.runCommand('/tellraw @s {"rawtext":[{"translate":"oct_plev.reward_available.100"}]}'); player.runCommand('/playsound random.toast @s ~ ~ ~ 1 1.5'); player.runCommand('/particle oct_plev:threshold_particle ~ ~0.5 ~'); player.addTag(TAG_REWARD_INFO_100); }
            }
        }

    system.runInterval(main, 5);
    