From 5e57b2ad0b893de3e11c75fdf5e627f41921b4de Mon Sep 17 00:00:00 2001 From: boi1216 <38191543+boi1216@users.noreply.github.com> Date: Sat, 9 Apr 2022 16:50:39 +0200 Subject: [PATCH] fix victory title --- src/BedWars/game/Game.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/BedWars/game/Game.php b/src/BedWars/game/Game.php index e475daa..75faf65 100644 --- a/src/BedWars/game/Game.php +++ b/src/BedWars/game/Game.php @@ -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, " "); @@ -874,4 +876,4 @@ public function tick() : void{ break; } } -} \ No newline at end of file +}