
<?php
echo "PocketMine-MP plugin EconomyAPI vDUMMY-1.0
This file has been generated using DevTools v1.13.0 at Wed, 12 Sep 2018 20:43:59 +0900
----------------
";

if(extension_loaded("phar")){
	$phar = new \Phar(__FILE__);
	foreach($phar->getMetadata() as $key => $value){
		echo ucfirst($key) . ": " . (is_array($value) ? implode(", ", $value) : $value) . "\n";
	}
}

__HALT_COMPILER(); ?>
y                a:9:{s:4:"name";s:10:"EconomyAPI";s:7:"version";s:9:"DUMMY-1.0";s:4:"main";s:29:"onebone\economyapi\EconomyAPI";s:3:"api";s:5:"3.2.1";s:6:"depend";s:0:"";s:11:"description";s:0:"";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1536752639;}
   plugin.ymlk   [k   t      %   src/onebone/economyapi/EconomyAPI.php  [  ?n      name: EconomyAPI
main: onebone\economyapi\EconomyAPI
version: "DUMMY-1.0"
author: metowa1227
api: 3.2.1<?php

/*
*  __  __       _                             __    ___    ___   _______
* |  \/  | ___ | |_  ___   _    _  ____  _   |  |  / _ \  / _ \ |___   /
* | |\/| |/ _ \| __|/ _ \ | |  | |/  _ \/ /  |  | |_// / |_// /    /  /
* | |  | |  __/| |_| (_) || |__| || (_)   |  |  |   / /_   / /_   /  /
* |_|  |_|\___| \__|\___/ |__/\__||____/\_\  |__|  /____| /____| /__/
*
* All this program is made by hand of metowa1227.
* I certify here that all authorities are in metowa1227.
* Expiration date of certification: unlimited
* Secondary distribution etc are prohibited.
* The update is also done by the developer.
* This plugin is a developer API plugin to make it easier to write code.
* When using this plug-in, be sure to specify it somewhere.
* Warning if violation is confirmed.
*
* Developer: metowa1227
*/

/*
    Plugin description

    - CONTENTS
        - Dummy API of MoneySystem

    - AUTHOR
        - metowa1227 (MoneySystem)
        - onebone (Economy)

    - DEVELOPMENT ENVIRONMENT
        - Windows 10 Home 64bit
        - Intel(R) Core(TM) i7 6700 @ 3.40GHz
        - 16.00GB DDR4 SDRAM
        - PocketMine-MP 3.2.2
        - PHP 7.2.1 64bit supported version
*/

namespace onebone\economyapi;

use metowa1227\moneysystem\api\core\API;

use pocketmine\plugin\PluginBase;

class EconomyAPI extends PluginBase
{
	public static $instance = null;
	
	public function onEnable() {}

	public function getCommandMessage(string $command, $lang = false) : array
	{
		return [];
	}

	public function getMessage(string $key, array $params = [], string $player = "console") : string
	{
		return "EcodummyAPI does not support multi languages.";
	}

	public function setPlayerLanguage(string $player, string $language) : bool
	{
		return false;
	}

	public function getMonetaryUnit() : string
	{
		return API::getInstance()->getUnit();
	}

	public function getAllMoney() : array
	{
		$data = [];
		foreach (API::getInstance()->getAll() as $keys => $values) {
			array_push($data, $values["money"]);
		}
		return $data;
	}

	public function createAccount($player, $defaultMoney = false, bool $force = false) : bool
	{
		$defaultMoney = ($defaultMoney === false) ? -1 : $defaultMoney;
		return API::getInstance()->createAccount($player, $defaultMoney);
	}

	public function accountExists($player) : bool
	{
		return API::getInstance()->exists($player);
	}

	public function myMoney($player)
	{
		return API::getInstance()->get($player);
	}

	public function setMoney($player, $amount, bool $force = false, string $issuer = "none") : int
	{
		return API::getInstance()->set($player, $amount, "none", $issuer);
	}

	public function addMoney($player, $amount, bool $force = false, $issuer = "none") : int
	{
		return API::getInstance()->increase($player, $amount, "none", $issuer);
	}

	public function reduceMoney($player, $amount, bool $force = false, $issuer = "none") : int
	{
		return API::getInstance()->reduce($player, $amount, "none", $issuer);
	}

	public static function getInstance(){
		return self::$instance;
	}

	public function onLoad(){
		self::$instance = $this;
	}

	public function saveAll()
	{
		return API::getInstance()->save();
	}
}c j6Q(4    GBMB