public function getLine()
{
if ($this->buffer->count() !== 0) {
return $this->buffer->shift();
}
return null;
}
public function checkConsole() { Timings::$serverCommandTimer->startTiming(); if (($line = $this->console->getLine()) !== null) { $this->pluginManager->callEvent($ev = new ServerCommandEvent($this->consoleSender, $line)); if (!$ev->isCancelled()) { $this->dispatchCommand($ev->getSender(), $ev->getCommand()); } } Timings::$serverCommandTimer->stopTiming(); }