
<?php
echo "PocketMine-MP plugin Konmmand v1.0.0
This file has been generated using DevTools v1.13.0 at Tue, 30 Oct 2018 23:42:08 +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(); ?>
~               a:9:{s:4:"name";s:8:"Konmmand";s:7:"version";s:5:"1.0.0";s:4:"main";s:11:"chaca142\KC";s:3:"api";a:2:{i:0;s:5:"4.0.0";i:1;s:5:"3.3.1";}s:6:"depend";s:0:"";s:11:"description";s:21:"コマンドで挨拶";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1540910528;}
   plugin.yml   m[   Xe         src/chaca142/KC.phpu  m[u  mS      name: Konmmand
main: chaca142\KC
author: chaca142
version: 1.0.0
api:
  - 4.0.0
  - 3.3.1
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;
    }
}<Z	z`X]C5=.KXh   GBMB