cleanup communicationmanager

This commit is contained in:
kremsy
2015-06-26 11:48:21 +02:00
parent f9fd1ad90b
commit 9760a59836
6 changed files with 42 additions and 17 deletions

View File

@ -7,6 +7,7 @@ use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\Callbacks\Callbacks;
use ManiaControl\Callbacks\TimerListener;
use ManiaControl\Communication\CommunicationAnswer;
use ManiaControl\Communication\CommunicationListener;
use ManiaControl\Communication\CommunicationMethods;
use ManiaControl\Logger;
@ -111,7 +112,7 @@ class PlayerManager implements CallbackListener, TimerListener, CommunicationLis
// Communication Listenings
$this->maniaControl->getCommunicationManager()->registerCommunicationListener(CommunicationMethods::GET_PLAYER_LIST, $this, function ($data) {
return array("error" => false, "data" => $this->players);
return new CommunicationAnswer($this->players);
});
}