Skip to content

Commit

Permalink
fix victory title
Browse files Browse the repository at this point in the history
  • Loading branch information
boi1216 authored Apr 9, 2022
1 parent 3fc13a3 commit 5e57b2a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/BedWars/game/Game.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,12 @@ public function tick() : void{
break;
case Game::STATE_REBOOT;
$team = $this->winnerTeam;
foreach($this->winnerTeam->getPlayers() as $player){
if($this->rebootTime == 15){
$player->sendTitle(TextFormat::BOLD . TextFormat::GOLD . "VICTORY!", "", 5, 1000);
}
}
foreach(array_merge($this->players, $this->spectators) as $player){
if($this->rebootTime == 15){
$player->sendTitle(TextFormat::BOLD . TextFormat::GOLD . "VICTORY!", "", 5, 500);
}
Scoreboard::remove($player);
Scoreboard::new($player, 'bedwars', TextFormat::BOLD . TextFormat::YELLOW . "Bed Wars");
Scoreboard::setLine($player, 1, " ");
Expand All @@ -874,4 +876,4 @@ public function tick() : void{
break;
}
}
}
}

0 comments on commit 5e57b2a

Please sign in to comment.