Download the PHP package dapigguy/libpiggyeconomy without Composer
On this page you can find all versions of the php package dapigguy/libpiggyeconomy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package libpiggyeconomy
libPiggyEconomy
libPiggyEconomy is a virion for easy support of multiple economy providers.
Supported Providers
- EconomyAPI by onebone/poggit-orphanage
- BedrockEconomy by cooldogedev
- Experience (PMMP)
Usage
Setup
Using Economy Providers
$providerInformation
is an array with the key .
Economy Provider Methods
Method | Description | Callback Signature | Callback Description |
---|---|---|---|
Returns symbol of currency | none |
none |
|
Get balance of a player | function(float|int $amount) void{} |
Returns default balance if player wasn't found, float|int otherwise. | |
Give money to a player | function(bool $success): void{} |
Returns true if money was given successfully, otherwise false. | |
Take money from a player | function(bool $success): void{} |
Returns true if money was taken successfully, otherwise false. | |
Set balance of a player | function(bool $success): void{} |
Returns true if money was set successfully, otherwise false. |
Error Handling
There are several exceptions that can be thrown that you may want to handle in your plugin:
- MissingProviderDependencyException
- UnknownProviderException
Examples
config.yml
AmazingPlugin.php
All versions of libpiggyeconomy with dependencies
PHP Build Version
Package Version
Requires
pocketmine/pocketmine-mp Version
^5.0.0
The package dapigguy/libpiggyeconomy contains the following files
Loading the files please wait ....