Updated to XML-RCP Callbacks Version 2.5.0

This commit is contained in:
Jocy
2018-03-27 19:56:09 +02:00
parent a0b42964c2
commit 3d6fe73163
4 changed files with 107 additions and 3 deletions

View File

@ -23,7 +23,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
class ModeScriptEventManager implements UsageInformationAble {
use UsageInformationTrait;
const API_VERSION = "2.3.0";
const API_VERSION = "2.5.0";
/** @var ManiaControl $maniaControl */
private $maniaControl;
@ -281,6 +281,26 @@ class ModeScriptEventManager implements UsageInformationAble {
$this->triggerModeScriptEvent('Maniaplanet.UI.SetAltScoresTableVisibility', array($login, "True"));
}
/**
* Hides the Scoreboard
*
* @param \ManiaControl\Players\Player $player
*/
public function hideScoreBoard(Player $player) {
$login = Player::parseLogin($player);
$this->triggerModeScriptEvent('Maniaplanet.UI.SetScoresTableVisibility', array($login, "False"));
}
/**
* Displays the Scoreboard
*
* @param \ManiaControl\Players\Player $player
*/
public function displayScoreBoard(Player $player) {
$login = Player::parseLogin($player);
$this->triggerModeScriptEvent('Maniaplanet.UI.SetScoresTableVisibility', array($login, "True"));
}
/**
* Extend the duration of any ongoing warmup.
*