The code is there below PHP: <?phpnamespace coolguy\lastplayed;use pocketmine\plugin\PluginBase;use pocketmine\Player;use pocketmine\command\CommandSender;use pocketmine\command\Command;use pocketmine\IPlayer;class lastplayed extends PluginBase implements pocketmine\IPlayer { public function onCommand(CommandSender $sender, Command $command, $label, array $args) { if(strtolower($command->getName("lastplayed"))) { switch($command->getName()): case "lastplayed": //This is to find out when the player last played// $sender->sendMessage($player->getName()."has last played".$player->getLastPlayed()); endswitch; } }
I already told you, $command->getName() accepts no parameters. Learn PHP and look at the source code oe the docs.