<?php echo "Altay plugin TopMoneyRepair v1.0.3\nThis file has been generated using Turanic at Wed, 17 Oct 2018 06:44:36 +0900.\n----------------\n";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(); ?>
               a:9:{s:4:"name";s:14:"TopMoneyRepair";s:7:"version";s:5:"1.0.3";s:4:"main";s:19:"TopMoneyRepair\main";s:3:"api";a:1:{i:0;s:5:"4.0.0";}s:6:"depend";a:0:{}s:11:"description";s:0:"";s:7:"authors";a:1:{i:0;s:5:"PJZ9n";}s:7:"website";s:16:"http://asvd.net/";s:12:"creationDate";i:1539726276;}   src/TopMoneyRepair/main.phpJ  [[J  ׮      $   src/TopMoneyRepair/eventListener.php
  [[
  [{      
   plugin.yml   [[         <?php

    namespace TopMoneyRepair;

    use pocketmine\plugin\PluginBase;

    class main extends PluginBase
    {
        public $formId;
        const SUCCESS_TAG = "§l§bSUCCESS §a>> §r";
        const ERROR_TAG = "§l§4ERROR §a>> §r";

        public function onEnable(): void
        {
            $this->getLogger()->info("{$this->getDescription()->getName()} {$this->getDescription()->getVersion()} が読み込まれました");
            $this->getServer()->getPluginManager()->registerEvents(new eventListener($this), $this);
            $this->formId[0] = mt_rand(50000, 100000);
        }

        public function onDisable(): void
        {
            $this->getLogger()->info("{$this->getDescription()->getName()} {$this->getDescription()->getVersion()} が終了しました");
        }
    }<?php

    namespace TopMoneyRepair;

    use onebone\economyapi\EconomyAPI;
    use pocketmine\event\Listener;
    use pocketmine\event\server\CommandEvent;
    use pocketmine\network\mcpe\protocol\ModalFormRequestPacket;
    use pocketmine\Player;
    use pocketmine\plugin\Plugin;

    class eventListener implements Listener
    {
        private $plugin;

        public function __construct(Plugin $plugin)
        {
            $this->plugin = $plugin;
        }

        public function onUseCommand(CommandEvent $event)
        {
            $sender = $event->getSender();
            $command = $event->getCommand();
            if (strpos($command, "topmoney") !== false) {
                $event->setCancelled();
                if ($sender instanceof Player) {
                    $packet = new ModalFormRequestPacket();
                    $form = array(
                        "type" => "form",
                        "title" => "ECONOMY",
                        "content" => "--所持金ランキング--",
                        "buttons" => array(),
                    );
                    $count = 1;
                    $all_money = EconomyAPI::getInstance()->getAllMoney();
                    if (!EconomyAPI::getInstance()->getConfig()->get("add-op-at-rank")) {
                        foreach ($all_money as $key => $value) {
                            $is_player = $this->plugin->getServer()->getOfflinePlayer($key);
                            if ($is_player !== null && $is_player->isOp()) {
                                unset($all_money[$key]);
                            }
                        }
                    }
                    arsort($all_money);
                    foreach ($all_money as $key => $value) {
                        $color = "§f";
                        if ($count === 1) {
                            $color = "§l§e";
                        } else if ($count === 2) {
                            $color = "§l§7";
                        } else if ($count === 3) {
                            $color = "§l§6";
                        }
                        $form["content"] .= "\n{$color}{$count}§r. §a{$key}§r: §b{$value}";
                        $count++;
                    }
                    $packet->formData = json_encode($form);
                    $packet->formId = $this->plugin->formId[0];
                    $sender->sendDataPacket($packet);
                } else {
                    $sender->sendMessage(main::ERROR_TAG . "このコマンドはプレイヤーのみ実行できます！");
                }
            }
        }
    }name: TopMoneyRepair
main: TopMoneyRepair\main
version: 1.0.3
api: [4.0.0]
load: POSTWORLD
author: PJZ9n
desctiption: PMMP TopMoneyRepair Plugin
website: http://asvd.net/KUo6ie6xS   GBMB