From 1f032ff3c886cafb0af030485d923ab818d86aef Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 10 May 2023 17:11:00 +0200 Subject: [PATCH 1/3] Add duration to FightStatistics.disable --- .../src/de/steamwar/fightsystem/utils/FightStatistics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java index e15d91d..b46a0eb 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -131,7 +131,7 @@ public class FightStatistics { } 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)); + 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)); } unranked = false; -- 2.39.2 From 706e6c5ffd39d3727f31ef650b2a28e8a59390c7 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 11 May 2023 09:06:06 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=E2=80=9EFightSystem=5FCore/src/de/steamwar?= =?UTF-8?q?/fightsystem/utils/FightStatistics.java=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/de/steamwar/fightsystem/utils/FightStatistics.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java index b46a0eb..cf5e461 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -78,6 +78,7 @@ public class FightStatistics { FightTeam winner = FightSystem.getLastWinner(); String windescription = FightSystem.getLastWinreason(); String gameMode = Config.SchematicType.toDB(); + Instant endTime = Instant.now(); int blueLeader = getLeader(Fight.getBlueTeam()); int redLeader = getLeader(Fight.getRedTeam()); @@ -131,7 +132,7 @@ public class FightStatistics { } 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; -- 2.39.2 From b48577d325e65de46a42d0db9f377627913924c2 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 11 May 2023 09:07:43 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=E2=80=9EFightSystem=5FCore/src/de/steamwar?= =?UTF-8?q?/fightsystem/utils/FightStatistics.java=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/de/steamwar/fightsystem/utils/FightStatistics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java index cf5e461..f778061 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -132,7 +132,7 @@ public class FightStatistics { } 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, endTime.getEpochSeconds() - starttime.toInstant().getEpochSeconds())); + 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.getEpochSecond() - starttime.toInstant().getEpochSecond())); } unranked = false; -- 2.39.2