Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imjustnozell/libeco
Easy pocketmine economy provider util
https://github.com/imjustnozell/libeco
Last synced: 8 days ago
JSON representation
Easy pocketmine economy provider util
- Host: GitHub
- URL: https://github.com/imjustnozell/libeco
- Owner: imjustnozell
- License: gpl-3.0
- Created: 2024-11-15T01:32:58.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T01:33:15.000Z (about 2 months ago)
- Last Synced: 2024-12-26T07:07:00.279Z (8 days ago)
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libEco
**libEco is a PocketMine-MP virion that makes easy to use API of economy plugins!**## Installation
You can get the compiled .phar file on poggit by clicking [here](https://poggit.pmmp.io/ci/David-pm-pl/libEco/~).## Supports
Currently this library only supports BedrockEconomy and EconomyAPI.## Usage
LibEconomy makes using the economy plugins API easier!.## Check have any economy installed
```php
use davidglitch04\libEco\libEco;
if(libEco::isInstall()){
// Installed
} else{
// No any eco
}
```
## Get the money of a player```php
use davidglitch04\libEco\libEco;
libEco::myMoney($player, static function(float $money) : void {
var_dump($money);
});
```
## Add the money of a player```php
use davidglitch04\libEco\libEco;
libEco::addMoney($player, $amount);
```## Reduce the money of a player
```php
use davidglitch04\libEco\libEco;
libEco::reduceMoney($player, $amount, static function(bool $success) : void {
if($success){
//TODO IF SUCCESS
} else{
//TODO IF FAIL
}
});
```