Compare commits
2 Commits
09480c14eb
...
edbe75c39e
Author | SHA1 | Date | |
---|---|---|---|
edbe75c39e | |||
4f18b51cba |
@ -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 = 5.1;
|
const PLUGIN_VERSION = 5.2;
|
||||||
const PLUGIN_NAME = 'MatchManager Core';
|
const PLUGIN_NAME = 'MatchManager Core';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
@ -1059,6 +1059,9 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
|
|||||||
*/
|
*/
|
||||||
public function MatchEnd() {
|
public function MatchEnd() {
|
||||||
try {
|
try {
|
||||||
|
// Since now, we conside the match not started
|
||||||
|
$this->matchStarted = false;
|
||||||
|
|
||||||
// Load TimeAttack gamemode if possible
|
// Load TimeAttack gamemode if possible
|
||||||
$maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST);
|
$maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST);
|
||||||
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
|
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
|
||||||
@ -1114,6 +1117,9 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Since now, we conside the match not started
|
||||||
|
$this->matchStarted = false;
|
||||||
|
|
||||||
// Trigger Callback
|
// Trigger Callback
|
||||||
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_MATCHMANAGER_STOPMATCH, $this->matchid, $this->currentscore, $this->currentteamsscore);
|
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_MATCHMANAGER_STOPMATCH, $this->matchid, $this->currentscore, $this->currentteamsscore);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class MatchManagerPlayersPause implements ManialinkPageAnswerListener, CommandLi
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 159;
|
const PLUGIN_ID = 159;
|
||||||
const PLUGIN_VERSION = 1.3;
|
const PLUGIN_VERSION = 1.4;
|
||||||
const PLUGIN_NAME = 'MatchManager Players Pause';
|
const PLUGIN_NAME = 'MatchManager Players Pause';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
@ -138,6 +138,10 @@ class MatchManagerPlayersPause implements ManialinkPageAnswerListener, CommandLi
|
|||||||
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
|
||||||
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERINFOCHANGED, $this, 'displayPauseWidgetIfNeeded');
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERINFOCHANGED, $this, 'displayPauseWidgetIfNeeded');
|
||||||
|
|
||||||
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(MatchManagerCore::CB_MATCHMANAGER_STARTMATCH, $this, 'handleMatchManagerCoreCallback');
|
||||||
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(MatchManagerCore::CB_MATCHMANAGER_ENDMATCH, $this, 'handleMatchManagerCoreCallback');
|
||||||
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(MatchManagerCore::CB_MATCHMANAGER_STOPMATCH, $this, 'handleMatchManagerCoreCallback');
|
||||||
|
|
||||||
$this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::MP_STARTROUNDSTART, $this, 'handleBeginRoundCallback');
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(Callbacks::MP_STARTROUNDSTART, $this, 'handleBeginRoundCallback');
|
||||||
|
|
||||||
|
|
||||||
@ -328,6 +332,15 @@ class MatchManagerPlayersPause implements ManialinkPageAnswerListener, CommandLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* handleMatchManagerCoreCallback
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handleMatchManagerCoreCallback() {
|
||||||
|
$this->displayPauseWidgetIfNeeded();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate Manialinks variables
|
* Generate Manialinks variables
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@ use ManiaControl\Plugins\PluginManager;
|
|||||||
use ManiaControl\Settings\Setting;
|
use ManiaControl\Settings\Setting;
|
||||||
use ManiaControl\Settings\SettingManager;
|
use ManiaControl\Settings\SettingManager;
|
||||||
use ManiaControl\Commands\CommandListener;
|
use ManiaControl\Commands\CommandListener;
|
||||||
|
use Maniaplanet\DedicatedServer\InvalidArgumentException;
|
||||||
|
|
||||||
if (!class_exists('MatchManagerSuite\MatchManagerCore')) {
|
if (!class_exists('MatchManagerSuite\MatchManagerCore')) {
|
||||||
$this->maniaControl->getChat()->sendErrorToAdmins('MatchManager Core is required to use one of MatchManager plugin. Install it and restart Maniacontrol');
|
$this->maniaControl->getChat()->sendErrorToAdmins('MatchManager Core is required to use one of MatchManager plugin. Install it and restart Maniacontrol');
|
||||||
@ -37,7 +37,7 @@ class MatchManagerReadyButton implements ManialinkPageAnswerListener, CommandLis
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 158;
|
const PLUGIN_ID = 158;
|
||||||
const PLUGIN_VERSION = 1.3;
|
const PLUGIN_VERSION = 1.4;
|
||||||
const PLUGIN_NAME = 'MatchManager Ready Button';
|
const PLUGIN_NAME = 'MatchManager Ready Button';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
@ -135,6 +135,10 @@ class MatchManagerReadyButton implements ManialinkPageAnswerListener, CommandLis
|
|||||||
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
|
||||||
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERINFOCHANGED, $this, 'displayReadyWidgetIfNeeded');
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(PlayerManager::CB_PLAYERINFOCHANGED, $this, 'displayReadyWidgetIfNeeded');
|
||||||
|
|
||||||
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(MatchManagerCore::CB_MATCHMANAGER_STARTMATCH, $this, 'handleMatchManagerCoreCallback');
|
||||||
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(MatchManagerCore::CB_MATCHMANAGER_ENDMATCH, $this, 'handleMatchManagerCoreCallback');
|
||||||
|
$this->maniaControl->getCallbackManager()->registerCallbackListener(MatchManagerCore::CB_MATCHMANAGER_STOPMATCH, $this, 'handleMatchManagerCoreCallback');
|
||||||
|
|
||||||
// Register ManiaLink Pages
|
// Register ManiaLink Pages
|
||||||
$this->maniaControl->getManialinkManager()->registerManialinkPageAnswerListener(self::ACTION_READY, $this, 'handleReady');
|
$this->maniaControl->getManialinkManager()->registerManialinkPageAnswerListener(self::ACTION_READY, $this, 'handleReady');
|
||||||
|
|
||||||
@ -300,6 +304,14 @@ class MatchManagerReadyButton implements ManialinkPageAnswerListener, CommandLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* handleMatchManagerCoreCallback
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handleMatchManagerCoreCallback() {
|
||||||
|
$this->displayReadyWidgetIfNeeded();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate Manialinks variables
|
* Generate Manialinks variables
|
||||||
|
Loading…
Reference in New Issue
Block a user