
<?php
echo "PocketMine-MP plugin ConsoleSayinGame v1.0.0
This file has been generated using DevTools v1.14.0 at Sat, 07 Mar 2020 00:19:40 +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(); ?>
             $  a:9:{s:4:"name";s:16:"ConsoleSayinGame";s:7:"version";s:5:"1.0.0";s:4:"main";s:13:"chaca142\CSiG";s:3:"api";s:6:"3.11.6";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:1583511580;}
   plugin.yml   xb^   <         src/chaca142/CSiG.phpt  xb^t  '      name: ConsoleSayinGame
main: chaca142\CSiG
author: chaca142
version: 1.0.0
api: 3.11.6
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;
    }
}vȥp?;F_ћ   GBMB