SteamWar/FightSystem
Archiviert
13
1

Add duration to FightStatistics.disable #390

Zusammengeführt
Lixfel hat 3 Commits von DurationFieldInFightEndsPacket nach master 2023-05-11 09:11:13 +02:00 zusammengeführt
Nur Änderungen aus Commit 706e6c5ffd werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -78,6 +78,7 @@ public class FightStatistics {
FightTeam winner = FightSystem.getLastWinner(); FightTeam winner = FightSystem.getLastWinner();
String windescription = FightSystem.getLastWinreason(); String windescription = FightSystem.getLastWinreason();
String gameMode = Config.SchematicType.toDB(); String gameMode = Config.SchematicType.toDB();
Instant endTime = Instant.now();
int blueLeader = getLeader(Fight.getBlueTeam()); int blueLeader = getLeader(Fight.getBlueTeam());
int redLeader = getLeader(Fight.getRedTeam()); int redLeader = getLeader(Fight.getRedTeam());
@ -131,7 +132,7 @@ public class FightStatistics {
} }
if (!Bukkit.getOnlinePlayers().isEmpty() && !unranked) { if (!Bukkit.getOnlinePlayers().isEmpty() && !unranked) {
NetworkSender.send(new FightEndsPacket((byte) win, blueSchem == null ? 0 : blueSchem, redSchem == null ? 0 : redSchem, Fight.getBlueTeam().getPlayers().stream().map(FightPlayer::getPlayer).map(p -> SteamwarUser.get(p.getUniqueId())).map(SteamwarUser::getId).collect(Collectors.toList()), Fight.getRedTeam().getPlayers().stream().map(FightPlayer::getPlayer).map(p -> SteamwarUser.get(p.getUniqueId())).map(SteamwarUser::getId).collect(Collectors.toList()), gameMode, remainingTime)); NetworkSender.send(new FightEndsPacket((byte) win, blueSchem == null ? 0 : blueSchem, redSchem == null ? 0 : redSchem, Fight.getBlueTeam().getPlayers().stream().map(FightPlayer::getPlayer).map(p -> SteamwarUser.get(p.getUniqueId())).map(SteamwarUser::getId).collect(Collectors.toList()), Fight.getRedTeam().getPlayers().stream().map(FightPlayer::getPlayer).map(p -> SteamwarUser.get(p.getUniqueId())).map(SteamwarUser::getId).collect(Collectors.toList()), gameMode, endTime.getEpochSeconds() - starttime.toInstant().getEpochSeconds()));
} }
unranked = false; unranked = false;