diff --git a/application/core/Server/Server.php b/application/core/Server/Server.php index 8cc82576..0a710295 100644 --- a/application/core/Server/Server.php +++ b/application/core/Server/Server.php @@ -6,7 +6,9 @@ use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; +use Maniaplanet\DedicatedServer\Structures\ServerOptions; use Maniaplanet\DedicatedServer\Structures\SystemInfos; +use Maniaplanet\DedicatedServer\Structures\Version; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; /** @@ -197,7 +199,7 @@ class Server implements CallbackListener { /** * Get Server Player Info * - * @return array + * @return \Maniaplanet\DedicatedServer\Structures\Player */ public function getInfo() { return $this->maniaControl->client->getMainServerPlayerInfo(); @@ -206,7 +208,7 @@ class Server implements CallbackListener { /** * Get Server Options * - * @return array + * @return ServerOptions */ public function getOptions() { return $this->maniaControl->client->getServerOptions(); @@ -225,7 +227,7 @@ class Server implements CallbackListener { /** * Fetch Server Version * - * @return string + * @return Version */ public function getVersion() { return $this->maniaControl->client->getVersion(); diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index 0065c556..6a0dedf2 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -56,11 +56,10 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { private function openDedimaniaSession($init = false) { // Open session - - $path = "GRA"; - $serverVersion = $this->maniaControl->client->getVersion(); + $serverInfo = $this->maniaControl->server->getInfo(); + $serverVersion = $this->maniaControl->server->getVersion(); $packMask = substr($this->maniaControl->server->titleId, 2); - $this->dedimaniaData = new DedimaniaData("abc", "cde", $path, $packMask, $serverVersion); + $this->dedimaniaData = new DedimaniaData("abc", "cde", $serverInfo->path, $packMask, $serverVersion); $url = self::DEDIMANIA_URL;