HomeJavaModsMagicSpells API - Skript
MagicSpells API - Skript
[​IMG]
MagicSpells API - V 1.0

made by Alexis__l
with Skript



Dependencies :
Languages :
API Content :
How to use the API :
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:
Code (Java):
command / set - max - mana < player > < integer >:
    trigger :
        setMaxMana ( arg 1 , arg 2 )
Add Mana :
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"

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"

Set Mana Regen :
Code (Java):
command / set - mana - regen < player > < integer >:
    trigger :
        setManaRegen ( arg 1 , arg 2 )
Get Max Mana :

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)%"
Get Mana :

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)%"
Teach Spell :

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"
Remove Spell :

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"
Cast :

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"
Force Cast :

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"
Set Cooldown :
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"
Set Cooldown :

Code (Java):
command / get - cooldown < player > < text >:
    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





leave 5 stars if u read this<3
Quick facts

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.

Explore more