From ba1882f4c2a7603b4c8344715bfb993a355e652d Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 12 Nov 2017 11:41:35 +0000 Subject: [PATCH] Change winstreaks back to how they were previously handled --- .../game/modules/winstreak/WinStreakModule.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/winstreak/WinStreakModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/winstreak/WinStreakModule.java index b33fe97d0..0d0503f61 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/winstreak/WinStreakModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/winstreak/WinStreakModule.java @@ -51,16 +51,17 @@ public class WinStreakModule extends Module } winners.forEach(this::incrementStreak); + } - UtilServer.getPlayersCollection().forEach(player -> + @EventHandler(priority = EventPriority.MONITOR) + public void playerDeathOut(PlayerDeathOutEvent event) + { + if (event.isCancelled()) { - if (winners.contains(player)) - { - return; - } + return; + } - removeStreak(player); - }); + removeStreak(event.GetPlayer()); } @EventHandler(priority = EventPriority.LOW)