<?php namespace Main; use pocketmine\plugin\PluginBase; use pocketmine\command\Command; use pocketmine\command\CommandSender; class Main extends PluginBase { public function onCommand(CommandSender $sender, Command $cmd, String $label, array $args) : bool{ if($cmd === "test") { if(isset($args[0])){ $target = $this->getServer()->getPlayer($args[1]); if($target != null){ $sender->sendMessage("Gut gemacht!"); $target->sendMessage("Schlecht gemacht!"); return true; } } } return true; } } Why do this cmd nothing? I dont have a error!
Code: name: //Your plugin name goes here. author: //Enter the author name. api: [3.0.0-ALPHA12] //PMMP api.. main: //Enter the way/to/main version: //version of the plugin commands: test://the command description: //enter the description.
Also I just realized you should do Code: $cmd->getName() === "test"; instead of Code: $cmd === "test";
Oh yeah, i forgot it! Thank you its Working now! Yet can i programming a Troll Plugin without problems <3