Features:
**Self-healing persistent data: **The script automatically fixes or wipes corrupted NBT data for spell schools.
Spell level restrictions: You can require an exact spell level, a minimum, or a range (e.g. only level 3, or 2–4).
**Customizable restrictions for each spell: **require a specific school, skill, level, and/or spell level.
Feedback display toggle: Players can choose if restriction messages appear in the actionbar or chat with /spellschool feedback <true or false>
- Player spell school management with /spellschool set, /spellschool remove, /spellschool show.
- Tab-completion for all spell school commands (no need for quotes, just tab!).
- Restrict spell casting based on player’s spell school, skill unlocks, and level in a Puffish Skills category.
Admin commands: /spellschool fix (removes empty/corrupt entries), /spellschool nukecorrupt (wipes broken data).
Readable, multi-line feedback: All restriction messages are formatted with line breaks for easy reading.
Commands:
/spellschool set <school> – Add a spell school to yourself (tab-complete for all valid schools).
/spellschool remove <school> – Remove a school.
/spellschool show – See your current schools.
/spellschool fix – Remove empty/corrupt entries from your school list.
/spellschool nukecorrupt – Wipe your spell school data if it’s badly corrupted (use only if /fix doesn’t work).
/spellschool feedback – Shows your current feedback mode (actionbar or chat).
/spellschool feedback <true|false> – Set feedback to actionbar (true) or chat (false).
/spellrestrictions list – See all spell restrictions and your status for each.
Requirements:
KubeJS (Forge)
Kube Irons Spells
Irons Spells 'n Spellbooks
Puffish Skills (SkillsMod)
Place the script in the kubejs/server_scripts/spell_restriction_script_server.js. folder
Edit the SPELL_RESTRICTIONS array at the top of the script to add or change spell requirements for your server.
Questions or issues?
Reply here or DM me!