
<?php
echo "PocketMine-MP plugin GAPM v1.1.0
This file has been generated using DevTools v1.13.0 at Fri, 18 Jan 2019 17:34:32 +1030
----------------
";

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(); ?>
n               a:9:{s:4:"name";s:4:"GAPM";s:7:"version";s:5:"1.1.0";s:4:"main";s:13:"chaca142\GAPM";s:3:"api";a:1:{i:0;s:5:"3.5.5";}s:6:"depend";s:0:"";s:11:"description";s:21:"Give All Player Money";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1547795072;}
   plugin.yml   zA\   cN         src/chaca142/GAPM.php	  zA\	  :`R      name: GAPM
main: chaca142\GAPM
author: chaca142
version: 1.1.0
api:
  - 3.5.5
description: Give All Player Money
commands:
  gapm:
    description: "オンライン中のプレイヤーにお金を配布"<?php

namespace chaca142;

use pocketmine\Player;
use pocketmine\Server;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\utils\Config;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;

use onebone\economyapi\EconomyAPI;
use metowa1227\moneysystem\api\core\API;
use MixCoinSystem\MixCoinSystem;
use MoneyPlugin\MoneyPlugin;
use hayao\main;

class GAPM extends PluginBase implements Listener{

    public function onEnable(){
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
        $this->getLogger()->info("§aGAPMが読み込まれました");

        if(!file_exists($this->getDataFolder())){
            mkdir($this->getDataFolder(), 0744, true);
        }
        $this->set = new Config($this->getDataFolder() . "config.yml", Config::YAML, array(
            "Plugin" => "EconomyAPI"
            //必ず /reload をしてください
        ));
    }

    public function onCommand(CommandSender $sender, Command $command, string $label, array $args):bool{
        if(!$sender->isOp()){
            $sender->sendMessage("§c権限がありません");
            return false;
        }else{
            if(!isset($args[0])){
                $sender->sendMessage("§cお金の数が設定されていません /gapm <お金の数>");
                return false;
            }else{
                if(!$this->getServer()->getOnlinePlayers()) return false;
                foreach($this->getServer()->getOnlinePlayers() as $name);
                $plugin = $this->set->get("Plugin");

                if($plugin == "EconomyAPI"){
                    EconomyAPI::getInstance()->addMoney($name, $args[0]);
                    $this->getServer()->broadcastMessage("§aオンライン中の全プレイヤーに＄".$args[0]."を配りました");
                    return false;
                }
                if($plugin == "MixCoinSystem"){
                    MixCoinSystem::getInstance()->PlusCoin($name, $args[0]);
                    $this->getServer()->broadcastMessage("§aオンライン中の全プレイヤーに＄".$args[0]."を配りました");
                    return false;
                }
            }
        }
     return false;
    }

}@hu@cX?Wmja   GBMB