From 79b0c0cdf12118b15161d9eaed3eee21bb4185d7 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sun, 14 May 2017 09:43:54 +0200 Subject: [PATCH] used earlier callbacks --- core/Maps/MapQueue.php | 6 +++--- plugins/MCTeam/WidgetPlugin.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/Maps/MapQueue.php b/core/Maps/MapQueue.php index db00417b..0edcdf87 100644 --- a/core/Maps/MapQueue.php +++ b/core/Maps/MapQueue.php @@ -60,7 +60,7 @@ class MapQueue implements CallbackListener, CommandListener, UsageInformationAbl $this->maniaControl = $maniaControl; // Callbacks - $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::ENDMAP, $this, 'endMap'); + $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::MP_PODIUMSTART, $this, 'endMap'); $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::BEGINMAP, $this, 'beginMap'); $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::AFTERINIT, $this, 'handleAfterInit'); @@ -353,9 +353,9 @@ class MapQueue implements CallbackListener, CommandListener, UsageInformationAbl /** * Called on endmap * - * @param Map $map + * @internal */ - public function endMap(Map $map = null) { + public function endMap() { //Don't queue next map (for example on skip to map) if ($this->nextNoQueue) { $this->nextNoQueue = false; diff --git a/plugins/MCTeam/WidgetPlugin.php b/plugins/MCTeam/WidgetPlugin.php index 599d968e..0555061d 100644 --- a/plugins/MCTeam/WidgetPlugin.php +++ b/plugins/MCTeam/WidgetPlugin.php @@ -127,7 +127,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { // Callbacks $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::BEGINMAP, $this, 'handleOnBeginMap'); - $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::ENDMAP, $this, 'handleOnEndMap'); + $this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::MP_PODIUMSTART, $this, 'handleOnEndMap'); $this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerConnect'); $this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'updateWidgets'); $this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERINFOCHANGED, $this, 'updateWidgets');