I have not tried this yet, but I would say it is: PHP: public function onTransaction(InventoryTransactionEvent $event){ $command = "time set day"; $this->getServer()->dispatchCommand(new CommandSender(), $command);}