https://github.com/evolsoft/massiveeconomy
Advanced Economy Plugin + API for PocketMine-MP
https://github.com/evolsoft/massiveeconomy
massiveeconomy php plugin pocketmine-mp
Last synced: 11 months ago
JSON representation
Advanced Economy Plugin + API for PocketMine-MP
- Host: GitHub
- URL: https://github.com/evolsoft/massiveeconomy
- Owner: EvolSoft
- License: mit
- Created: 2014-12-27T14:22:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-12-05T15:08:59.000Z (over 5 years ago)
- Last Synced: 2025-04-04T22:22:57.526Z (over 1 year ago)
- Topics: massiveeconomy, php, plugin, pocketmine-mp
- Language: PHP
- Size: 16.6 KB
- Stars: 6
- Watchers: 5
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# MassiveEconomy
Advanced Economy Plugin + API for PocketMine-MP
[](http://gestyy.com/er3d89)
## Category
PocketMine-MP plugins
## Requirements
PocketMine-MP Alpha_1.4 API 1.9.0
## Overview
**MassiveEconomy** is an advanced economy plugin.
**EvolSoft Website:** http://www.evolsoft.tk
***This Plugin uses the New API. You can't install it on old versions of PocketMine.***
Manage your Server Economy with MassiveEconomy.
With MassiveEconomy you can customize minimum money, money symbol, first join money... (read documentation)
MassiveEconomy includes also an advanced API which you can create your plugins.
**What is included?**
In the ZIP file you will find:
*- MassiveEconomy_v1.0 R3.phar : MassiveEconomy Plugin + API*
*- MassiveEconomyExample_v1.phar : MassiveEconomy API implementation example*
*- MassiveEconomyExample : Example Plugin source code*
**Commands:**
**To-Do:**
*- Bug fix (if bugs will be found)*
*- MySQL support*
## Documentation
#### For Users:
**Configuration (config.yml):**
```yaml
---
#Money Symbol
money-symbol: "$"
#Default money when a player joins for first time (he must have the permission: massiveeconomy.receivedefault)
default-money: 500
#Minimum money that the player can have (you can use also negative numbers)
min-money: 0
...
```
**Commands:**
***/massiveeconomy*** *- MassiveEconomy commands (aliases: [meco, massiveeco, me])*
***/money <player (optional)>*** *- Show your money (or player's money)*
***/pay <player> <amount>*** *- Pay a player*
***/setmoney <player> <amount>*** *- Set player money*
**Permissions:**
-
-
-
-
-
-
-
-
-
#### For Developers
**Basic Tutorial:**
*1. Define the plugin dependency in plugin.yml:*
```yaml
depend: [MassiveEconomy]
```
*2. Include MassiveEconomy API in your php code:*
```php
use MassiveEconomy\MassiveEconomyAPI;
```
*3. Check if MassiveEconomy API is compatible (insert this code in onEnable() function)*
```php
if(MassiveEconomyAPI::getInstance()->getAPIVersion() == "(used API version)"){
//API compatible
}else{
//API not compatible
$this->getPluginLoader()->disablePlugin($this);
}
```
*4. Call the API function:*
```php
MassiveEconomyAPI::getInstance()->(API function);
```
***A full plugin example using MassiveEconomy API is included in the ZIP file.***
**API Functions:**
###### Get Money Symbol:
```php
string getMoneySymbol()
```
**Description:**
Get money symbol (defined in config).
**Return:**
money symbol
###### Get Default Money:
```php
int getDefaultMoney()
```
**Description:**
Get default money (defined in config).
**Return:**
default money
###### Get Minimum Money:
```php
int getMinimumMoney()
```
**Description:**
Get minimum money (defined in config).
**Return:**
minimum money
###### Get Version:
```php
string getVersion()
```
**Description:**
Get the MassiveEconomy plugin version.
**Return:**
plugin version
###### Get API Version:
```php
string getAPIVersion()
```
**Description:**
Get the MassiveEconomy API version.
**Return:**
plugin API version
###### Register Player:
```php
void RegisterPlayer(Player $player)
```
**Description:**
Register a player to MassiveEconomy.
**Parameters:**
*$player* **must** be the **Player** (pocketmine/Player)
###### Check if a Player is registered:
```php
boolean isPlayerRegistered($player)
```
**Description:**
Check if a player is registered to MassiveEconomy.
**Parameters:**
*$player* **must** be the **player name**
**Return:**
*true* if the player is registered
*false* if the player isn't registered
###### Get Money:
```php
int|boolean getMoney($player)
```
**Description:**
Get player money.
**Parameters:**
*$player* **must** be the **player name**
**Return:**
*player money* if the player is registered
*false* if the player isn't registered
###### Set Money:
```php
boolean setMoney($player, $amount)
```
**Description:**
Set player money.
**Parameters:**
*$player* **must** be the **player name**
*$amount* the amount (**must** be a **number**)
**Return:**
*player money* if the player is registered
*false* if the player isn't registered
###### Pay Player:
```php
boolean payPlayer($receiver, $amount)
```
**Description:**
Pay a player.
**Parameters:**
*$receiver* **must** be the **player name**
*$amount* the amount (**must** be a **number**)
**Return:**
*true* if the player is registered
*false* if the player isn't registered
###### Pay Player from Player
```php
int payMoneyToPlayer($sender, $amount, $receiver)
```
**Description:**
Pay money to player from another player.
**Parameters:**
*$sender* **must** be the **player name**
*$amount* the amount (**must** be a **number**)
*$receiver* **must** be the **player name**
**Return:**
*3* success
*2* if the sender hasn't enough money
*1* if the receiver isn't registered
*0* if the sender isn't registered
###### Take Money:
```php
int takeMoney($player, $amount)
```
**Description:**
Take Money from Player.
**Parameters:**
*$player* **must** be the **player name**
*$amount* the amount (**must** be a **number**)
**Return:**
*2* success
*1* if the player hasn't enough money
*0* if the player isn't registered