
<?php
echo "PocketMine-MP plugin Konmmand v2.0.0
This file has been generated using DevTools v1.14.0 at Sat, 07 Mar 2020 00:21:50 +0800
----------------
";

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(); ?>
e                a:9:{s:4:"name";s:8:"Konmmand";s:7:"version";s:5:"2.0.0";s:4:"main";s:11:"chaca142\KC";s:3:"api";s:6:"3.11.6";s:6:"depend";s:0:"";s:11:"description";s:21:"コマンドで挨拶";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1583511710;}
   plugin.yml   xb^   *         src/chaca142/KC.phpu  xb^u  mS      name: Konmmand
main: chaca142\KC
author: chaca142
version: 2.0.0
api: 3.11.6
description: コマンドで挨拶
commands:
  kon:
    description: "/kon 挨拶"<?php

namespace chaca142;

use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\Server;
use pocketmine\Player;
use pocketmine\utils\Config;

class KC extends PluginBase implements Listener{

    public function onEnable(){

        if(!file_exists($this->getDataFolder())) {
            mkdir($this->getDataFolder(), true);
        }
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
        $this->set = new Config($this->getDataFolder() . "message.yml", CONFIG::YAML,array(
            "メッセージ"=>"こんちゃ",
        ));
        $this->set->save();
        $this->getLogger()->info('§aKonmmandを読み込みました');

    }

    public function onDisable(){

        $this->getLogger()->info('§cKonmmandを停止しました');

    }

    public function onCommand(CommandSender $sender, Command $command, string $label, array $args):bool
    {
        switch (strtolower($command->getName())) {

            case "kon":

                if (!$sender instanceof Player) {
                    $message = $this->set->get("メッセージ");
                    $this->getServer()->broadcastMessage("§d[Server]".$message."");
                }else{
                    $message = $this->set->get("メッセージ");
                    $player = $sender->getPlayer();
                    $name = $player->getName();
                    $this->getServer()->broadcastMessage("<".$name."> ".$message."");
                }
        }
     return false;
    }
}іLB   GBMB