From 6ed534bcb3acb70645f66747bec63643420f5f1e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 12 May 2023 23:29:28 +0200 Subject: [PATCH] Hotfix TeamCommand.tp --- .../bungeecore/network/handlers/FightEndsHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/network/handlers/FightEndsHandler.java b/src/de/steamwar/bungeecore/network/handlers/FightEndsHandler.java index 0076e8d2..e4815ebe 100644 --- a/src/de/steamwar/bungeecore/network/handlers/FightEndsHandler.java +++ b/src/de/steamwar/bungeecore/network/handlers/FightEndsHandler.java @@ -53,10 +53,10 @@ public class FightEndsHandler extends PacketHandler { @Handler public void handle(FightEndsPacket fightEndsPacket) { - BungeeCore.get().getLogger().log(Level.INFO, fightEndsPacket.getWin() + " " + fightEndsPacket.getBlueSchem() + " " + fightEndsPacket.getRedSchem() + " " + fightEndsPacket.getBluePlayers() + " " + fightEndsPacket.getRedPlayers() + " " + fightEndsPacket.getGameMode() + " " + fightEndsPacket.getDuration()); if (!ArenaMode.getBySchemType(SchematicType.fromDB(fightEndsPacket.getGameMode())).isRanked()) { return; } + BungeeCore.get().getLogger().log(Level.INFO, fightEndsPacket.getWin() + " " + fightEndsPacket.getBlueSchem() + " " + fightEndsPacket.getRedSchem() + " " + fightEndsPacket.getBluePlayers() + " " + fightEndsPacket.getRedPlayers() + " " + fightEndsPacket.getGameMode() + " " + fightEndsPacket.getDuration()); boolean bluePublic = SchematicNode.getSchematicNode(fightEndsPacket.getBlueSchem()).getOwner() == 0; boolean redPublic = SchematicNode.getSchematicNode(fightEndsPacket.getRedSchem()).getOwner() == 0; @@ -65,6 +65,8 @@ public class FightEndsHandler extends PacketHandler { return; } + BungeeCore.get().getLogger().log(Level.INFO, "After schematic public check"); + // Die nächsten Zeilen filtern ein Fight innerhalb eines Teams nicht gewertet wird, bzw auch wenn nur Teile beider Teams im // gleichen Team sind dieser ungewertet ist. Set teamsIds = fightEndsPacket.getBluePlayers().stream().map(SteamwarUser::get).map(SteamwarUser::getTeam).collect(Collectors.toSet()); @@ -74,6 +76,8 @@ public class FightEndsHandler extends PacketHandler { } } + BungeeCore.get().getLogger().log(Level.INFO, "After Team check"); + calcSchemElo(fightEndsPacket); calcUserElo(fightEndsPacket); } @@ -113,6 +117,7 @@ public class FightEndsHandler extends PacketHandler { private void update(List players, String gameMode, double factor) { for (int player : players) { + BungeeCore.get().getLogger().log(Level.INFO, "Player: " + player + " Elo: " + UserElo.getEloOrDefault(player, gameMode) + " Factor: " + factor); int playerElo = UserElo.getEloOrDefault(player, gameMode); int eloGain = (int) Math.round(MEDIAN_ELO_GAIN * factor); playerElo += eloGain;