
<?php
echo "PocketMine-MP plugin GAPM v1.0.0
This file has been generated using DevTools v1.13.0 at Wed, 16 Jan 2019 03:46:21 +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.0.0";s:4:"main";s:13:"chaca142\Main";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:1547572581;}
   plugin.yml   e>\   3f         src/chaca142/Main.php  e>\  q{      name: GAPM
main: chaca142\Main
author: chaca142
version: 1.0.0
api:
  - 3.5.5
description: Give All Player Money
commands:
  gapm:
    description: "全プレイヤーにコンフィグ分のMoneyを渡す /mset <お金の数> で設定"<?php

namespace chaca142;

use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\Server;
use pocketmine\Player;
use pocketmine\utils\Config;

use onebone\economyapi\EconomyAPI;

class Main extends PluginBase implements Listener
{

    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,
            [
            "Money"=> 100     //お金の数
        ]);
        $this->set->save();
    }

    function onCommand(CommandSender $sender, Command $command, string $label, array $args):bool {
        switch(strtolower($command->getName())) {
            case "gapm":
                if(!$sender->isOp()) return false;
                $money2 = $this->set->get("Money");
                foreach($this->getServer()->getOnlinePlayers() as $player){
                    EconomyAPI::getInstance()->addMoney($player, $money2);
                }
                $this->getServer()->broadcastMessage("§a全プレイヤーに$".$money2."を配りました");
                return false;
        }
     return false;
    }
}T\WXw-!<   GBMB