Class MoneyAPI
This class allows you to use a number of miscellaneous Economy
plugins.
Methods summary
public static
|
#
noMoney( pocketmine\plugin\PluginBase $plugin, LogLevel $level = aliuly\common\LogLevel::WARNING )
Show a warning when the money API is missing
Show a warning when the money API is missing
Parameters
|
public static
|
#
foundMoney( pocketmine\plugin\PluginBase $plugin, pocketmine\plugin\PluginBase $api, LogLevel $level = aliuly\common\LogLevel::INFO )
Show a notice when the money API is found
Show a notice when the money API is found
Parameters
|
public static
null|Plugin
|
#
moneyPlugin( var $obj )
Find a supported money plugin
Find a supported money plugin
Parameters
Returns
null|Plugin
|
public static
boolean
|
#
grantMoney( Plugin $api, str|pocketmine\IPlayer $p, integer $money )
Gives money to a player.
Parameters
- $api
- Economy plugin (from moneyPlugin)
- $p
- Player to pay
- $money
- Amount of money to play (can be negative)
Returns
boolean
|
public static
integer
|
#
getMoney( Plugin $api, str|pocketmine\IPlayer $player )
Gets player balance
Parameters
- $api
- Economy plugin (from moneyPlugin)
- $player
- Player to lookup
Returns
integer
|