Sueta
MA

ManaAPI [1.8 - 1.18.x]

1.1

Integrate a Mana system into your plugin

·Plugin

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:

  1. Add to your plugin
  2. Copy into Plugins folder on your Server

Similar projects

Plugin →