add function to know if a a match is running

This commit is contained in:
Beu 2024-01-04 16:00:54 +01:00
parent fb3bf97bfc
commit ca7a07ac2a

View File

@ -38,7 +38,7 @@ use ManiaControl\Callbacks\TimerListener; // for pause
class MatchManagerCore implements CallbackListener, CommandListener, TimerListener, CommunicationListener, Plugin { class MatchManagerCore implements CallbackListener, CommandListener, TimerListener, CommunicationListener, Plugin {
const PLUGIN_ID = 152; const PLUGIN_ID = 152;
const PLUGIN_VERSION = 4.7; const PLUGIN_VERSION = 4.8;
const PLUGIN_NAME = 'MatchManager Core'; const PLUGIN_NAME = 'MatchManager Core';
const PLUGIN_AUTHOR = 'Beu'; const PLUGIN_AUTHOR = 'Beu';
@ -573,6 +573,10 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
return $this->matchStarted; return $this->matchStarted;
} }
public function getMatchIsRunning() {
return ($this->matchStarted && $this->settingsloaded && !$this->postmatch);
}
public function getCurrentGamemodeBase() { public function getCurrentGamemodeBase() {
return $this->currentgmbase; return $this->currentgmbase;
} }