This commit is contained in:
YuTian 2024-08-13 11:35:18 +08:00
parent a4a544a001
commit 368392118f

View File

@ -236,7 +236,6 @@ public class DungeonInstance {
break;
}
state = DungeonState.RUNNING;
countdown = dungeon.getConfig().getOption().getCountdown();
for (DungeonPlayer dungeonPlayer : getPlayers()) {
dungeonPlayer.getPlayer().setGameMode(dungeon.getConfig().getOption().getGameMode());
dungeonPlayer.getPlayer().teleport(dungeon.getConfig().getStartPoint().toLocation(worldInstance.getWorld()));
@ -305,8 +304,8 @@ public class DungeonInstance {
}
private void updateBossBar() {
bossBar.setTitle("倒计时: " + countdown + "/" + dungeon.getConfig().getOption().getCountdown());
float progress = (float) countdown / (float) dungeon.getConfig().getOption().getCountdown();
bossBar.setTitle("倒计时: " + countdown + "/" + totalCountdown);
float progress = (float) countdown / (float) totalCountdown;
bossBar.setProgress(progress);
bossBar.setColor(BossBarUtil.getBarColor(progress));
}