
<?php
echo "PocketMine-MP plugin MoneyReset v1.0.0
This file has been generated using DevTools v1.13.0 at Mon, 26 Nov 2018 17:32:31 +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(); ?>
µ             J  a:9:{s:4:"name";s:10:"MoneyReset";s:7:"version";s:5:"1.0.0";s:4:"main";s:15:"MoneyReset\Main";s:3:"api";a:5:{i:0;s:5:"3.0.0";i:1;s:13:"3.0.0-ALPHA11";i:2;s:13:"3.0.0-ALPHA12";i:3;s:5:"3.3.2";i:4;s:5:"4.0.0";}s:6:"depend";s:0:"";s:11:"description";s:0:"";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1543221152;}
   plugin.ymlª    ¯û[ª   Üauq¶         src/MoneyReset/Main.phpB   ¯û[B  ™­?ù¶      ---
name: MoneyReset
main: MoneyReset\Main
version: 1.0.0
api:
- 3.0.0
- 3.0.0-ALPHA11
- 3.0.0-ALPHA12
- 3.3.2
- 4.0.0
load: POSTWORLD
author: â˜…seiâ˜…
...
<?php
namespace MoneyReset;

use pocketmine\plugin\PluginBase;
use pocketmine\Server;
use pocketmine\Player;
use pocketmine\event\Listener;
use pocketmine\utils\Config;
use pocketmine\event\player\PlayerCommandPreprocessEvent;
use pocketmine\event\server\ServerCommandEvent;
use onebone\economyapi\EconomyAPI;

class Main extends PluginBase implements Listener{
        public function onEnable(){
                $this->getServer()->getPluginManager()->registerEvents($this,$this);
                if(!file_exists($this->getDataFolder())){
                        mkdir($this->getDataFolder(), 0744, true);
                }
                $this->money = new Config($this->getDataFolder() . "money.yml", Config::YAML);

                $this->getLogger()->info("ENABLED");
		$this->EconomyAPI = $this->getServer()->getPluginManager()->getPlugin("EconomyAPI");
		if($this->EconomyAPI === null){
                        $this->getLogger()->info("Â§cEconomyAPI is not found");
                        $this->getServer()->getPluginManager()->disablePlugin($this);
		}
        }

        public function onPlayerCommand(PlayerCommandPreprocessEvent $event){
                $command = $event->getMessage();
                $opcommand = substr($command, 0, 4);
                $deopcommand = substr($command, 0, 6);
		if($opcommand == "/op "){
                        $name = str_replace($opcommand,"",$command);

                        if($this->EconomyAPI->myMoney($name)){
                                $money = $this->EconomyAPI->myMoney($name);
                                $this->money->set($name,$money);
                                $this->money->save();
                        }
                }

                if($deopcommand == "/deop "){
                        $name = str_replace($deopcommand,"",$command);

                        if($this->money->exists($name)){
                                $money = $this->money->get($name);
                                $this->EconomyAPI->setMoney($name, $money);
                                $this->money->remove($name);
                                $this->money->save();
                        }
                }
        }

        public function onServerCommand(ServerCommandEvent $event){
                $command = $event->getCommand();
                $opcommand = substr($command, 0, 3);
                $deopcommand = substr($command, 0, 5);
		if($opcommand == "op "){
                        $name = str_replace($opcommand,"",$command);

                        if($this->EconomyAPI->myMoney($name)){
                                $money = $this->EconomyAPI->myMoney($name);
                                $this->money->set($name,$money);
                                $this->money->save();
                        }
                }

                if($deopcommand == "deop "){
                        $name = str_replace($deopcommand,"",$command);

                        if($this->money->exists($name)){
                                $money = $this->money->get($name);
                                $this->EconomyAPI->setMoney($name, $money);
                                $this->money->remove($name);
                                $this->money->save();
                        }
                }
        }
}
køÐÞ]ª¤’U±nã©°G»r#   GBMB