With this API you can easily integrate a Mana System into your plugin.
It doesn't save when the Player leaves! It will be added later.
Documentation:
Set the maximum amount of Mana a Player can have:
ManaApi.setMaxMana(Player player, int amount)
Set the current amount of Mana from a Player:
ManaApi.setCurrentMana(Player player, int amount)
Get the maximum amount of Mana a Player can have (returns int):
ManaApi.getMaxMana(Player player)
Get the current amount of Mana from a Player (returns int):
ManaApi.getCurrentMana(Player player)
Increase a Players maximum Mana amount:
ManaApi.addMaxMana(Player player, int amount)
Decrease a Players maximum Mana amount:
ManaApi.removeMaxMana(Player player, int amount)
Increase a Players current Mana amount:
ManaApi.addCurrentMana(Player player, int amount)
Decrease a Players current Mana amount:
ManaApi.removeCurrentMana(Player player, int amount)
Recover the Mana from a Player (recovers every minute):
ManaApi.recoverMana(Player player, float recoveryPercent)
Install:
- Add to your plugin
- Copy into Plugins folder on your Server