Ekonomy - PocketMine economy plugin with unlimited currencies & more features

Overview

Ekonomy

What does this plugin do?

Similar to EconomyAPI, This economy plugin is optimized with asynchronous query libraries such as libasynql and await-generator, this plugin strictly supports API version 4.0.0 with PHP8.

Usage

API Plugin
This plugin works as API and economy management plugin.

Commands:

Command Description Permission Default
/givemoney Gives money to a player from your account. ekonomy.cmd.givemoney op
/mymoney See your money. ekonomy.cmd.mymoney true
/pay Pay amount of money to a player. ekonomy.cmd.pay true
/seemoney See a player's money. ekonomy.cmd.seemoney op
/setmoney Set the player's money to specified amount. ekonomy.cmd.setmoney op
/takemoney Takes money from player's account. ekonomy.cmd.takemoney op
/topmoney See the top richest players in server. ekonomy.cmd.topmoney true

API Documentation

Getting a player's money

use octopush\ekonomy\api\EkonomyAPI;
/**
* @param string|Player $player The player from whom you want to get the money.
* @return int|float the player's money
*/
public static function myMoney(string|Player $player): int|float;

Setting player's money

use octopush\ekonomy\api\EkonomyAPI;
/**
* @param string|Player $player The player from whom you want to set the money.
* @param int|float $amount The money amount
* @return void
*/
public static function setMoney(string|Player $player, int|float $amount): void;

Adding amount of money to a player

use octopush\ekonomy\api\EkonomyAPI;
/**
* @param string|Player $player The player from whom you want to add the money.
* @param int|float $amount The money amount
* @return void
*/
public static function addMoney(string|Player $player, int|float $amount): void;

Reducing amount of money to a player

use octopush\ekonomy\api\EkonomyAPI;
/**
* @param string|Player $player
* @param int|float $amount
* @return void
*/
public static function reduceMoney(string|Player $player, int|float $amount): void;

Getting all the money from database

use octopush\ekonomy\api\EkonomyAPI;
/**
* @return array all the player's money
*/
#[ArrayShape(["name" => "int|float"])]
public static function getAllMoney(): array;

This function returns an username => money array.

Event Handling

AddMoneyEvent

use octopush\ekonomy\event\money\AddMoneyEvent;

public function onAddMoney(AddMoneyEvent $event): void {
	$receiver = $event->getReceiver();
	$issuer = $event->getIssuer();
	$amount = $event->getAmount();
	$onlineReceiver = $event->getOnlineReceiver(); // Returns the player's object in case it is online.
}

MoneyChangeEvent

use octopush\ekonomy\event\money\MoneyChangeEvent;

public function onMoneyChange(MoneyChangeEvent $event): void {
	$player = $event->getPlayer(); // The player to whom the money was changed.
	$issuer = $event->getIssuer();
	$amount = $event->getAmount();
	$oldMoney = $event->getOldMoney();
	$newMoney = $event->getNewMoney();
	$onlinePlayer = $event->getOnlinePlayer(); // Returns the player's object in case it is online.
}

MoneyReduceEvent

use octopush\ekonomy\event\money\MoneyReduceEvent;

public function onMoneyReduce(MoneyReduceEvent $event): void {
	$player = $event->getPlayer(); // The player to whom the money was reduced.
	$issuer = $event->getIssuer();
	$amount = $event->getAmount(); // The amount reduced
	$onlinePlayer = $event->getOnlinePlayer(); // Returns the player's object in case it is online.
}

MoneySetEvent

use octopush\ekonomy\event\money\MoneySetEvent;

public function onMoneySet(MoneySetEvent $event): void {
	$player = $event->getPlayer(); // The player to whom the money was setted.
	$issuer = $event->getIssuer();
	$money = $event->getMoney(); // The new player money
	$onlinePlayer = $event->getOnlinePlayer(); // Returns the player's object in case it is online.
}

PlayerBankruptEvent

use octopush\ekonomy\event\player\PlayerBankruptEvent;

public function onPlayerBankrupt(PlayerBankruptEvent $event): void {
	$player = $event->getPlayer(); // The bankrupt player.
}

PlayerPayEvent

use octopush\ekonomy\event\player\PlayerPayEvent;

public function onPlayerPay(PlayerPayEvent $event): void {
	$receiver = $event->getReceiver();
	$sender = $event->getSender();
	$amount = $event->getAmount();
	$onlineReceiver = $event->getOnlineReceiver(); // Returns the player's object in case it is online.
}

Frequently Asked Questions

Q. What is the difference between this plugin and EconomyAPI?
A. This plugin is designed with best practices of asynchronous programming, you will have no lags or overloads on your PocketMine server.

You might also like...
Recoded, added features, removed useless stuff, more efficent code, PER PLAYER TEXT
Recoded, added features, removed useless stuff, more efficent code, PER PLAYER TEXT

WFT - 1.2.0 (BETA) Hello, and welcome to WFT. NOW IN API 4.0 This is the official recode of my old plugin WFT, witch had some issues. Overall I was no

Easy management of Virtualization technologies including KVM, Xen, OpenVZ, Virtuozzo, and LXC/LXD including unified commands, monitoring, template management, and many more features.

ProVirted About Easy management of Virtualization technologies including KVM, Xen, OpenVZ, Virtuozzo, and LXC/LXD including unified commands, monitori

DiscordLookup | Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more...
DiscordLookup | Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more...

DiscordLookup Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more... Website Getting Help Tool

This Pocketmine-MP plugin is a plugin including a complete faction system.

SimpleFaction Simple faction plugin replacing FactionsPro which is no longer updated. Commands Command Name Command Description Available for /f help

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more

OctoberCMS BlogHub Plugin - Extends RainLab's Blog extension with custom meta details, additional archives and more.

BlogHub extends the RainLab.Blog OctoberCMS plugin with many necessary and helpful features such as Moderatable Comments, Promotable Tags, Custom Meta Fields, additional Archives, basic Statistics, Views counter and more.

WordPress plugin renames image filenames to be more SEO friendly, based on the post's data and image metadata.

=== Automatic image Rename === Contributors: wpsunshine Tags: image, images, SEO, rename, optimization Requires at least: 5.0 Tested up to: 6.2.2 Stab

Owner
OctoPush
I'm a plugin developer for PocketMine-MP and Nukkit. I'm from Colombia and I invest my free time to create new plugins and support the community.
OctoPush
Cool economy plugin for PM-like servers. API included.

Economy Description Cool and easy to use economy plugin API: 2.0.0 Plugin version: 1.0.0 Default money value on first join: 1000 (can be changed in co

Artem Turov 0 Feb 4, 2022
Smd tags - A Textpattern CMS plugin for unlimited, structured taxonomy across content types.

smd_tags Tag articles, images, files and links with stuff, then use the public-side tags to display the lists, filter or find related content. Feature

Stef Dawson 4 Dec 26, 2022
Economy made easy for Minecraft: Bedrock

BedrockEconomy Economy made easy for Minecraft Bedrock Commands Name Description Usage Permission balance Show your and others balance balance [player

null 33 Oct 24, 2022
Ratio plugin is a luck plugin. The more lucky you are, the more you win!

Ratio Ratio plugin is a luck plugin. The more lucky you are, the more you win Features When you break a block (Cobblestone), it gives/puts you somethi

Ali Tura Çetin 2 Apr 25, 2022
A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

thebigcrafter 6 Jan 4, 2023
Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion.

Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.

Łukasz Lach 112 Nov 24, 2022
Glz custom fields - Unlimited Custom Fields for Textpattern

Unlimited custom fields for Textpattern This plugin sits under the Extensions tab in the back-end and gives your custom fields new life. You can final

Gerhard Lazu 21 Dec 1, 2019
Laravel Plans is a package for SaaS apps that need management over plans, features, subscriptions, events for plans or limited, countable features.

Laravel Plans Laravel Plans is a package for SaaS apps that need management over plans, features, subscriptions, events for plans or limited, countabl

ángel 2 Oct 2, 2022
A plugin to add more blocks to PocketMine

This plugin aims to add all blocks not included in PocketMine. As of right now the ExtendedBlocks plugin is required to add blocks with IDs above 255.

xSuper 26 Dec 19, 2022
Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..

Rafel is Remote Access Tool Used to Control Victims Using WebPanel With More Advance Features..

swagkarna 690 Dec 28, 2022