
<?php
echo "PocketMine-MP plugin oplist v1.0.0
This file has been generated using DevTools v1.14.0 at Sat, 30 May 2020 12:57:36 +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(); ?>
             2  a:9:{s:4:"name";s:6:"oplist";s:7:"version";s:5:"1.0.0";s:4:"main";s:18:"roi611\oplist\Main";s:3:"api";s:5:"3.0.0";s:6:"depend";s:0:"";s:11:"description";s:36:"oplistコマンドを追加します";s:7:"authors";s:0:"";s:7:"website";s:32:"https://github.com/roi611/oplist";s:12:"creationDate";i:1590811056;}
   plugin.yml  ^  j7         src/roi611/oplist/Main.php  ^  %0      name: oplist
main: roi611\oplist\Main
version: 1.0.0
api: 3.0.0
load: POSTWORLD
author: roi611
description: oplistコマンドを追加します
website: https://github.com/roi611/oplist

commands: 
  oplist:
     description: oplistを表示します
     usage: /oplist 
<?php
    
    namespace roi611\oplist;
    
use pocketmine\plugin\PluginBase;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\event\Listener;
use pocketmine\Player;
    
    class Main extends PluginBase implements Listener {
    
    public function onEnable() {
       
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
    }
    
    public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{
        if(!$sender instanceof Player) {

            $sender->sendMessage("§cゲーム内で実行してください");
            return true;
        }
        
    
        
        $ops = [];
        foreach($this->getServer()->getOps()->getAll() as $opName => $isOp){
            $ops[] = $opName;
        }
        $sender->sendMessage("§eOP:§9\n".implode("\n§9", $ops));
        
        return true;
        
        }
        
}
m"VT:C_g\+I   GBMB