match settings manager
This commit is contained in:
@ -25,7 +25,7 @@ use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
use ManiaControl\Players\PlayerManager;
|
||||
use ManiaControl\Plugins\Plugin;
|
||||
use ManiaControl\Server\Server;
|
||||
use ManiaControl\Server\MatchSettingsManager;
|
||||
use ManiaControl\Server\ServerCommands;
|
||||
use Maniaplanet\DedicatedServer\Structures\VoteRatio;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
|
||||
@ -139,7 +139,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERMANIALINKPAGEANSWER, $this, 'handleManialinkPageAnswer');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(self::CB_CUSTOM_VOTE_FINISHED, $this, 'handleVoteFinished');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerConnect');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(Server::CB_TEAM_MODE_CHANGED, $this, 'constructMenu');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(MatchSettingsManager::CB_TEAM_MODE_CHANGED, $this, 'constructMenu');
|
||||
|
||||
//Settings
|
||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_VOTE_ICON_POSX, 156.);
|
||||
@ -243,7 +243,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');
|
||||
$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Mapskip');
|
||||
|
||||
if ($this->maniaControl->server->isTeamMode()) {
|
||||
if ($this->maniaControl->server->matchSettingsManager->isTeamMode()) {
|
||||
//Menu TeamBalance
|
||||
$itemQuad = new Quad_Icons128x32_1();
|
||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team);
|
||||
|
@ -358,7 +358,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
* @return String
|
||||
*/
|
||||
private function getGameModeString() {
|
||||
$gameMode = $this->maniaControl->server->getGameMode();
|
||||
$gameMode = $this->maniaControl->server->matchSettingsManager->getGameMode();
|
||||
$scriptNameResponse = $this->maniaControl->client->getScriptName();
|
||||
$scriptName = str_replace('.Script.txt', '', $scriptNameResponse["CurrentValue"]);
|
||||
if ($gameMode === null) {
|
||||
|
@ -335,7 +335,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
|
||||
$properties = array();
|
||||
|
||||
$gameMode = $this->maniaControl->server->getGameMode(true);
|
||||
$gameMode = $this->maniaControl->server->matchSettingsManager->getGameMode(true);
|
||||
if ($gameMode == 'Script') {
|
||||
$scriptName = $this->maniaControl->client->getScriptName();
|
||||
$properties['gamemode'] = $scriptName["CurrentValue"];
|
||||
@ -444,7 +444,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
return;
|
||||
}
|
||||
|
||||
$gameMode = $this->maniaControl->server->getGameMode(true);
|
||||
$gameMode = $this->maniaControl->server->matchSettingsManager->getGameMode(true);
|
||||
|
||||
if (count($votes) == 0) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user