protected function init() { new \ManiaLive\Features\Tick\Ticker(); $config = \ManiaLive\DedicatedApi\Config::getInstance(); $this->connection = Connection::factory($config->host, $config->port, $config->timeout, $config->user, $config->password); $this->connection->enableCallbacks(true); \ManiaLive\Data\Storage::getInstance(); \ManiaLive\Features\ChatCommand\Interpreter::getInstance(); \ManiaLive\Features\EchoHandler::getInstance(); \ManiaLive\Gui\GuiHandler::getInstance(); \ManiaLive\PluginHandler\PluginHandler::getInstance(); \ManiaLive\Threading\ThreadHandler::getInstance(); Dispatcher::dispatch(new Event(Event::ON_INIT)); }
/** * This will unregister all chat commands that have been * created using the plugins method registerChatCommand. */ public final function unregisterAllChatCommands() { while ($command = array_pop($this->chatCommands)) { Interpreter::getInstance()->unregister($command); } }