Esempio n. 1
0
 public function onOutput(BuyCraft $main, CommandSender $sender)
 {
     $out = $this->getOutput();
     if (isset($out["payload"]["commands"])) {
         foreach ($this->getOutput()["payload"]["commands"] as $cmd) {
             $p = $cmd["requireOnline"] ? $main->getServer()->getPlayer($cmd["ign"]) : null;
             if (!$cmd["requireOnline"] || $p !== null) {
                 $main->getCommandExecuteTask()->queueCommand(new PackageCommand($cmd));
             }
         }
     }
 }