Queue widget refresh 2
This commit is contained in:
parent
88d939bdbd
commit
76ac094636
@ -65,7 +65,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
|
|
||||||
foreach($this->maniaControl->playerManager->getPlayers() as $player) {
|
foreach($this->maniaControl->playerManager->getPlayers() as $player) {
|
||||||
if($player->isSpectator) {
|
if($player->isSpectator) {
|
||||||
$this->spectators[] = $player->login;
|
$this->spectators[$player->login] = $player->login;
|
||||||
$this->maniaControl->client->forceSpectator($player->login, 1);
|
$this->maniaControl->client->forceSpectator($player->login, 1);
|
||||||
$this->showJoinQueueWidget($player);
|
$this->showJoinQueueWidget($player);
|
||||||
}
|
}
|
||||||
@ -144,13 +144,13 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
$player = $this->maniaControl->playerManager->getPlayer($login);
|
$player = $this->maniaControl->playerManager->getPlayer($login);
|
||||||
|
|
||||||
if($player->isSpectator) {
|
if($player->isSpectator) {
|
||||||
$this->spectators[$player->login] = $player;
|
$this->spectators[$player->login] = $player->login;
|
||||||
$this->maniaControl->client->forceSpectator($player->login, 1);
|
$this->maniaControl->client->forceSpectator($player->login, 1);
|
||||||
$this->showJoinQueueWidget($player);
|
$this->showJoinQueueWidget($player);
|
||||||
} else {
|
} else {
|
||||||
if(count($this->queue) != 0) {
|
if(count($this->queue) != 0) {
|
||||||
$this->maniaControl->client->forceSpectator($player->login, 1);
|
$this->maniaControl->client->forceSpectator($player->login, 1);
|
||||||
$this->spectators[$player->login] = $player;
|
$this->spectators[$player->login] = $player->login;
|
||||||
$this->showJoinQueueWidget($player);
|
$this->showJoinQueueWidget($player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
|||||||
if($player->isSpectator) {
|
if($player->isSpectator) {
|
||||||
if(!isset($this->spectators[$player->login])) {
|
if(!isset($this->spectators[$player->login])) {
|
||||||
$this->maniaControl->client->forceSpectator($player->login, 1);
|
$this->maniaControl->client->forceSpectator($player->login, 1);
|
||||||
$this->spectators[$player->login] = $player;
|
$this->spectators[$player->login] = $player->login;
|
||||||
$this->showJoinQueueWidget($player);
|
$this->showJoinQueueWidget($player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user