hello i will realease a plugin named KickOp i need help so this is needed: kicks who did /opme list players who did /opme in list.yml also the ***** is i dont know how to ill add in author who did this
I though someone already made this called OpMe? Anyway your code would look something like this: PHP: <?php /*__PocketMine Plugin__name=KickOpdescription=Kick those who ask for OPversion=1.0.0author=Takuki Uchihaclass=KickOpapiversion=11,12*/ class KickOp implements plugin{ private $api; public function __construct (ServerAPI $api, $server = false){ $this->api = $api;} public function init(){ $this->api->console->register("opme", "Op Yourself!!!", array($this, "commandhandler")); console("KickOp Loaded!");} public function OpMe($data){ switch() case "opme": $issuer = $player->username; new config($this->api->plugin->configPath($this) . "Players/" . strtolower($issuer) . ".yml", CONFIG_YAML, array( )); $this->console->run("kick ".$issuer." No asking for permissions!"); break;}} I just woke up about a half hour ago so there may be a few errors but it should work. Let me know if there are and i will edit this post to fix them. Also I did something a little more simple than adding the issuers name into a single file. I set it up so that (just in case you decide to ad a configuration file later) the issuer will have a file generated in /plugins/KickOp/Players/(issuer name).yml and from there the server owner can access the list of people faster plus it doesnt give you as many headaches! NOTE: I am NOT giving you permission to use this exact code! You MUST use your own or I will report it as stolen!