updated dedicated-server-api exception usages

This commit is contained in:
Steffen Schröder
2014-05-13 17:59:37 +02:00
parent d16e89d13d
commit 16d2571485
22 changed files with 106 additions and 111 deletions

View File

@ -193,7 +193,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
break;
case self::RANKING_TYPE_RECORDS: //TODO verify workable status
if (!$this->maniaControl->pluginManager->isPluginActive('MCTeam\LocalRecordsPlugin')) {
if (!$this->maniaControl->pluginManager->isPluginActive(__NAMESPACE__ . '\LocalRecordsPlugin')) {
return;
}
@ -201,7 +201,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
$maxRecords = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAX_STORED_RECORDS);
$query = 'SELECT playerIndex, COUNT(*) AS Cnt
FROM ' . \MCTeam\LocalRecordsPlugin::TABLE_RECORDS . '
FROM ' . LocalRecordsPlugin::TABLE_RECORDS . '
GROUP BY PlayerIndex
HAVING Cnt >=' . $requiredRecords;
@ -212,8 +212,8 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
}
$result->free_result();
/** @var \MCTeam\LocalRecordsPlugin $localRecordsPlugin */
$localRecordsPlugin = $this->maniaControl->pluginManager->getPlugin('MCTeam\LocalRecordsPlugin');
/** @var LocalRecordsPlugin $localRecordsPlugin */
$localRecordsPlugin = $this->maniaControl->pluginManager->getPlugin(__NAMESPACE__ . '\LocalRecordsPlugin');
$maps = $this->maniaControl->mapManager->getMaps();
foreach ($maps as $map) {
$records = $localRecordsPlugin->getLocalRecords($map, $maxRecords);