[Free version] Mana Requirement
Last updated
If you are using premium, there is a easy way to do this using the GUI, so you could skips all this steps. If don't know what we are talking about ask in Discord.
Plugin that uses Mana (Aurelium Skills will be used as reference)
ExecutableItems
PlaceholderAPI
Let's use the right click activator for example
We will use the placeholder condition to check the required amount of mana
We will use the PLAYER_NUMBER
type
In this case (AureliumSkills) we will use the placeholder %aureliumskills_mana%
to check the amount of mana.
Then we will use the SUPERIOR_OR_EQUALS comparator to make it so it will run the activator if your mana has equal or more than the value written in the 2dn part.
In the 2nd part we will write the amount of mana needed for the item (In this example it will be 5 of mana)
We have the condition ready, now on commands we will need to remove that mana
The mana remove %player% 5
command is important as it's task is to remove mana assuming you added a cost to the activation of the activator. If you just want it to make sure the player has the required amount of mana and not take away mana, there's no need to add this command.
Just add the commands you want to add after the mana remove %player% 5
command
And ready !! Now you can add more commands in that section to complete your item ! :D
After all changes save your item and test it, it would run the commands only when you have the correct amount of mana.
This is how it should look (Made by Special70)
Type the error message at messageIfNotValid: '&e'
to make the activator send a message if you do not have the required amount of mana