small bugfix
This commit is contained in:
parent
7b3d0d7420
commit
522d7e4a2a
@ -19,6 +19,7 @@ class MapCommands implements CommandListener {
|
|||||||
* Private properties
|
* Private properties
|
||||||
*/
|
*/
|
||||||
private $maniaControl = null;
|
private $maniaControl = null;
|
||||||
|
private $mapList = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create MapCommands instance
|
* Create MapCommands instance
|
||||||
@ -38,6 +39,8 @@ class MapCommands implements CommandListener {
|
|||||||
$this->maniaControl->commandManager->registerCommandListener('xlist', $this, 'command_xList');
|
$this->maniaControl->commandManager->registerCommandListener('xlist', $this, 'command_xList');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('list', $this, 'command_List');
|
$this->maniaControl->commandManager->registerCommandListener('list', $this, 'command_List');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('maps', $this, 'command_List');
|
$this->maniaControl->commandManager->registerCommandListener('maps', $this, 'command_List');
|
||||||
|
|
||||||
|
$this->mapList = new MapList($this->maniaControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -123,8 +126,7 @@ class MapCommands implements CommandListener {
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function command_List(array $chatCallback, Player $player) {
|
public function command_List(array $chatCallback, Player $player) {
|
||||||
$mapList = new MapList($this->maniaControl);
|
$this->mapList->showMapList($player);
|
||||||
$mapList->showMapList($player);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -133,7 +135,6 @@ class MapCommands implements CommandListener {
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function command_xList(array $chatCallback, Player $player) {
|
public function command_xList(array $chatCallback, Player $player) {
|
||||||
$mapList = new MapList($this->maniaControl);
|
$this->mapList->showManiaExchangeList($chatCallback, $player);
|
||||||
$mapList->showManiaExchangeList($chatCallback, $player);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function showManiaExchangeList(array $chatCallback, Player $player){
|
public function showManiaExchangeList(array $chatCallback, Player $player){
|
||||||
$this->maniaControl->manialinkManager->closeWidget($player);
|
|
||||||
|
|
||||||
$params = explode(' ', $chatCallback[1][2]);
|
$params = explode(' ', $chatCallback[1][2]);
|
||||||
|
|
||||||
$serverInfo = $this->maniaControl->server->getSystemInfo();
|
$serverInfo = $this->maniaControl->server->getSystemInfo();
|
||||||
@ -214,8 +212,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function showMapList(Player $player){
|
public function showMapList(Player $player){
|
||||||
$this->maniaControl->manialinkManager->closeWidget($player);
|
|
||||||
|
|
||||||
$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID);
|
$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID);
|
||||||
$frame = $this->buildMainFrame();
|
$frame = $this->buildMainFrame();
|
||||||
$maniaLink->add($frame);
|
$maniaLink->add($frame);
|
||||||
|
Loading…
Reference in New Issue
Block a user