
<?php
echo "PocketMine-MP plugin ConsoleSayinGame v0.0.1
This file has been generated using DevTools v1.13.0 at Wed, 31 Oct 2018 15:19:42 +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:16:"ConsoleSayinGame";s:7:"version";s:5:"0.0.1";s:4:"main";s:13:"chaca142\CSiG";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:48:"ゲーム内からコンソールのSayを使う";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1540966782;}
   plugin.yml  ~I[  e         src/chaca142/CSiG.phpt  ~I[t  '      name: ConsoleSayinGame
main: chaca142\CSiG
author: chaca142
version: 0.0.1
api:
  - 4.0.0
  - 3.3.1
description: ゲーム内からコンソールのSayを使う
commands:
  cs:
    description: "/cs <message> コンソールと同じsayを使う"<?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;

class CSiG extends PluginBase implements Listener{

    public function onEnable(){
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
        $this->getLogger()->info("§aCSiGが読み込まれました");
    }

    public function onDisable(){
        $this->getLogger()->info("§cCSiGを停止しました");
    }

    public function onCommand(CommandSender $sender, Command $command, string $label, array $args):bool {
        switch(strtolower($command->getName())){

            case "cs":

                if(!$sender instanceof Player){
                    $this->getLogger()->info('§cコンソールからの実行はできません');
                }else{
                    if(!isset($args[0])) return false;
                    $this->getServer()->broadcastMessage("§d[Server] ".$args[0]."");
                }
        }
     return false;
    }
}?9CG^S=/{   GBMB