Simple economy plugin designed for Pocketmine-MP servers, offering a multi-economy system.
AzEconomy is a simple plugin designed for Pocketmine-MP servers, offering a multi-economy system.
Command | Description | Permission |
---|---|---|
/azeconomy currencies | Show your currencies | azeconomy.command.currencies |
/azeconomy pay <player> <currency> <amount> | Pay currency to a player | azeconomy.command.pay |
/azeconomy set <player> <currency> <amount> | Set currency to a player | azeconomy.command.set |
/azeconomy take <player> <currency> <amount> | Take currency to a player | azeconomy.command.add |
/azeconomy give <player> <currency> <amount> | Give currency to a player | azeconomy.command.remove |
/azeconomy top | Show top players | azeconomy.command.top |
Event | Description |
---|---|
EconomyTransactionEvent | Called when a player's currency changes |
Get Currency:
$callback = function(float $currency) : void {
// Do something
};
EcoAPI::getCurrency(string $username, string $currency, callable $callback);
Get Currencies:
$callback = function(?BaseCurrencies $currency) : void {
// Do something
};
EcoAPI::getCurrencies(string $username, callable $callback);
Set Currency:
$callback = function (bool $success) : void {
// Do something
};
EcoAPI::setCurrency(string $username, string $currency, float $amount, $callback);
Add Currency:
$callback = function (bool $success) : void {
// Do something
};
EcoAPI::addCurrency(string $username, string $currency, float $amount, $callback);
Remove Currency:
$callback = function (bool $success) : void {
if(!$success) {
// not enough currency
}
};
EcoAPI::removeCurrency(string $username, string $currency, float $amount, $callback);