MagicSpells API - V 1.0
made by Alexis__l
with Skript
Languages :
- Español
- English
- Set max mana
- Add mana
- Remove mana
- Set mana regen
- Get max mana
- Get mana
- Teach spell
- Remove spell
- Cast
- Force cast
- Set cooldown
- Get cooldown.
First you have to download the skript and put it in the Scripts folder (/plugins/skript/scripts), then use /sk reload MagicSpells API - Skript
And o'go, the API will be installed in your Skripts folder. Now to use it you will need to use the functions found in that skript.
Spoiler: Examples
Set Max Mana:
Add Mana
:
Remove Mana :
Set Mana Regen :
Get Max Mana :
Get Mana :
Teach Spell :
Remove Spell :
Cast :
Force Cast :
Set Cooldown :
Set Cooldown :
Code (Java):
command
/ set
- max
- mana
< player
>
< integer
>:
trigger :
setMaxMana ( arg 1 , arg 2 )
trigger :
setMaxMana ( arg 1 , arg 2 )
Code (Java):
command
/ add
- mana
< player
>
< integer
>:
trigger :
if addMana ( arg 1 , arg 2 ) is true :
message "You added %arg 2% mana to %arg 1%"
else :
message "an error ocurried"
trigger :
if addMana ( arg 1 , arg 2 ) is true :
message "You added %arg 2% mana to %arg 1%"
else :
message "an error ocurried"
Remove Mana :
Code (Java):
command
/ remove
- mana
< player
>
< integer
>:
trigger :
if removeMana ( arg 1 , arg 2 ) is true :
message "you removed %arg 2% of mana from %player%"
else :
message "an error ocurried"
trigger :
if removeMana ( arg 1 , arg 2 ) is true :
message "you removed %arg 2% of mana from %player%"
else :
message "an error ocurried"
Set Mana Regen :
Code (Java):
command
/ set
- mana
- regen
< player
>
< integer
>:
trigger :
setManaRegen ( arg 1 , arg 2 )
trigger :
setManaRegen ( arg 1 , arg 2 )
Code (Java):
command
/ get
- max
- mana
[
< player
>
]
:
trigger :
if arg 1 is not set :
message "Your Max Mana is: %getMaxMana(player)%"
else :
message "%arg 1%'s max mana is %getMaxMana(arg 1)%"
trigger :
if arg 1 is not set :
message "Your Max Mana is: %getMaxMana(player)%"
else :
message "%arg 1%'s max mana is %getMaxMana(arg 1)%"
Code (Java):
command
/ get
- mana
< player
>:
trigger :
if arg 1 is not set :
message "Your Actual Mana is: %getMana(player)%"
else :
message "%arg 1%'s actual mana is %getMana(arg 1)%"
trigger :
if arg 1 is not set :
message "Your Actual Mana is: %getMana(player)%"
else :
message "%arg 1%'s actual mana is %getMana(arg 1)%"
Code (Java):
command
/ teach
- spell
< player
>
< text
>:
trigger :
if teachSpell ( arg 1 , arg 2 ) is true :
message "%player% teach you the %arg 2% spell" to arg 1
else :
message "&cAn error ocurried"
trigger :
if teachSpell ( arg 1 , arg 2 ) is true :
message "%player% teach you the %arg 2% spell" to arg 1
else :
message "&cAn error ocurried"
Code (Java):
command
/ remove
- spell
< player
>
< text
>:
trigger :
if arg 2 is "*" :
removeSpell ( arg 1 , arg 2 )
message "%player% remove all your spells from your spellbook" to arg 1
else :
if removeSpell ( arg 1 , arg 2 ) is true :
message "%player% remove %arg 2% spell from your spellbook" to arg 1
else :
message "an error ocurried"
trigger :
if arg 2 is "*" :
removeSpell ( arg 1 , arg 2 )
message "%player% remove all your spells from your spellbook" to arg 1
else :
if removeSpell ( arg 1 , arg 2 ) is true :
message "%player% remove %arg 2% spell from your spellbook" to arg 1
else :
message "an error ocurried"
Code (Java):
command
/ ms
- api
- cast
< player
>
< text
>:
trigger :
if cast ( player, arg 2 ) is true :
message "you casted the %arg 2% spell" to arg 1
else :
message "an error ocurried"
trigger :
if cast ( player, arg 2 ) is true :
message "you casted the %arg 2% spell" to arg 1
else :
message "an error ocurried"
Code (Java):
command
/ force
- cast
< player
>
< text
>:
trigger :
cast ( player, arg 2 )
message "you casted the %arg 2% spell" to arg 1
command / entity - cast < text >:
trigger :
cast ( targeted entity, arg 1 )
message "%targeted entity% cast the %arg 1% spell"
trigger :
cast ( player, arg 2 )
message "you casted the %arg 2% spell" to arg 1
command / entity - cast < text >:
trigger :
cast ( targeted entity, arg 1 )
message "%targeted entity% cast the %arg 1% spell"
Code (Java):
command
/ set
- cooldown
< player
>
< text
>
< integer
>:
trigger :
setCooldown ( player, arg 2 , arg 3 )
message "You set the cooldown of %player% %arg 2%'s spell to %arg 3% seconds"
trigger :
setCooldown ( player, arg 2 , arg 3 )
message "You set the cooldown of %player% %arg 2%'s spell to %arg 3% seconds"
Code (Java):
command
/ get
- cooldown
< player
>
< text
>:
trigger :
message "The cooldown of %arg 2% spell is %getCooldown(player, arg 2)% seconds"
trigger :
message "The cooldown of %arg 2% spell is %getCooldown(player, arg 2)% seconds"
Any suggestions will be welcome.
In case you find bugs report it to me.
My Discord User : alexis.__l#9027
In case you find bugs report it to me.
My Discord User : alexis.__l#9027
leave 5 stars if u read this<3
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.12
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
MagicSpells API - Skript is a free Minecraft Java mod. Compatible with Minecraft 1.12. Downloaded 740 times (via Spigot). Download it and open it directly in the game.