This plugin will add Mana on your server
Mana is a Pocketmine MP Plugin that will add mana features on your server.
Every time you're sprint or jump, The mana will decrease.
When the mana reach 0, You will get blindness effect.
If you want mana to be regenerated, You have to stay at a place and didn't moving an inch.
Command | Description | Usage |
---|---|---|
/mana | View player's mana stats | /mana [string:player] |
/managemana [FORM TYPE] | Manage player's mana stats | /managemana [string:player] |
/managemana [MANUAL TYPE] | Manage player's mana stats | /managemana [string:player] [add/reduce/set] [float:amount] |
/managemanaregen [FORM TYPE] | Manage player's mana regen | /managemanaregen [string:player] |
/managemanaregen [MANUAL TYPE] | Manage player's mana regen | /managemanaregen [string:player] [add/reduce/set] [float:amount] |
/managemaxmana [FORM TYPE] | Manage player's max mana | /managemaxmana [string:player] |
/managemaxmana [MANUAL TYPE] | Manage player's max mana | /managemaxmana [string:player] [add/reduce/set] [float:amount] |
Command | Permissions | Default | Description |
---|---|---|---|
/mana | manastats.mana.cmd | True | View Your Own Stats |
/mana | manastats.mana.cmd.others | OP | View Other's Stats |
/managemana | manastats.managemana.cmd | OP | Manage Player's Mana |
/managemanaregen | manastats.managemanaregen.cmd | OP | Manage Player's Mana Regen |
/managemaxmana | manastats.managemaxmana.cmd | OP | Manage Player's Max Mana |
- | manastats.mana.bypass | False | Bypass Mana System |
Note: The Mana won't be saved on Database, so every time player join the server, their mana will be reset from 0
Importing The ManaStats File
use FresherGAMING\Mana\ManaStats;
If you want to get the player's mana, Only For Online Players
$player = //Could be string name or player type
ManaStats::getInstance()->getMana($player);
If you want to add the player's mana, Only For Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->addMana($player, $amount);
If you want to reduce the player's mana, Only For Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->reduceMana($player, $amount);
If you want to set the player's mana, Only For Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->setMana($player, $amount);
If you want to get the player's mana regen, Only For Online Players
$player = //Could be string name or player type
ManaStats::getInstance()->getManaRegen($player);
If you want to add the player's mana regen, Could be Offline or Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->addManaRegen($player, $amount);
If you want to reduce the player's mana regen, Could be Offline or Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->reduceManaRegen($player, $amount);
If you want to set the player's mana regen, Could be Offline or Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->setManaRegen($player, $amount);
If you want to get the player's max mana, Only For Online Players
$player = //Could be string name or player type
ManaStats::getInstance()->getMaxMana($player);
If you want to add the player's max mana, Could be Offline or Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->addMaxMana($player, $amount);
If you want to reduce the player's max mana, Could be Offline or Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->reduceMaxMana($player, $amount);
If you want to set the player's max mana, Could be Offline or Online Players
$player = //Could be string name or player type
$amount = //Could be float type
ManaStats::getInstance()->setMaxMana($player, $amount);
$player = //Could be string name or player type
ManaStats::getInstance()->retrieveDataFromDatabase($player, function($result){
if(count($result) < 1){
//Player not Found
}
foreach($result as $stats){
//$stats["maxmana"] to get the player's max mana
//$stats["manaregen"] to get the player's mana regen
}
});
Version: 1.0.0
Downloads: 913
Updated: 4/24/2024
Supported API versions: 5.0.0 to 5.27.1
Categories: General, API plugins, Mechanics
License: GPL-3.0