begin Maplist widget

This commit is contained in:
kremsy
2013-12-14 22:00:59 +01:00
parent a1104c327a
commit 6bb13fb2df
7 changed files with 214 additions and 6 deletions

View File

@ -7,6 +7,7 @@ use ManiaControl\Admin\AuthenticationManager;
use ManiaControl\Commands\CommandListener;
use ManiaControl\FileUtil;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
/**
* Class offering commands to manage maps
@ -31,6 +32,9 @@ class MapCommands implements CommandListener {
$this->maniaControl->commandManager->registerCommandListener('restartmap', $this, 'command_RestartMap',true);
$this->maniaControl->commandManager->registerCommandListener('addmap', $this, 'command_AddMap',true);
$this->maniaControl->commandManager->registerCommandListener('removemap', $this, 'command_RemoveMap',true);
// Register for player commands
$this->maniaControl->commandManager->registerCommandListener('list', $this, 'command_list');
}
/**
@ -183,6 +187,13 @@ class MapCommands implements CommandListener {
}
return $this->maniaControl->client->query('RestartMap');
}
public function command_list(array $chatCallback, Player $player){
// var_dump($chatCallback);
$mapList = new MapList($this->maniaControl);
$mapList->showMapList($player);
}
}
?>