diff --git a/src/PocketDockConsole/Main.php b/src/PocketDockConsole/Main.php index 9a04df4..4274d63 100644 --- a/src/PocketDockConsole/Main.php +++ b/src/PocketDockConsole/Main.php @@ -24,7 +24,8 @@ public function onEnable() { $this->reloadConfig(); $this->getLogger()->info(TextFormat::DARK_GREEN . "Enabled"); $this->setPassword(); - $this->thread = new SocksServer("0.0.0.0", $this->getConfig()->get("port"), $this->getServer()->getLogger(), $this->getServer()->getLoader(), $this->getConfig()->get("password"), stream_get_contents($this->getResource("PluginIndex.html")), $this->getConfig()->get("backlog")); + $this->thread = new SocksServer("0.0.0.0", $this->getConfig()->get("port"), $this->getServer()->getLogger(), $this->getServer()->getLoader(), $this->getConfig()->get("password"), stream_get_contents($pluginIndex = $this->getResource("PluginIndex.html")), $this->getConfig()->get("backlog")); + @fclose($pluginIndex); $this->rc = new RunCommand($this); $this->getServer()->getScheduler()->scheduleRepeatingTask($this->rc, 1); $this->lastBufferLine = "";