diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java index 62978c22b..1d4506b45 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/Evolution.java @@ -73,6 +73,7 @@ import org.bukkit.event.entity.EntityCombustEvent; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerItemHeldEvent; +import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.util.Vector; public class Evolution extends SoloGame @@ -141,7 +142,7 @@ public class Evolution extends SoloGame GemAssistDeathRespawn = .5; CompassEnabled = true; - CompassGiveItem = false; + CompassGiveItem = false; AutomaticRespawn = false; DeathSpectateSecs = 4.0; @@ -149,8 +150,7 @@ public class Evolution extends SoloGame VersionRequire1_8 = true; CreatureAllow = false; - - InventoryClick = false; + InventoryClick = false; InventoryOpenBlock = false; @@ -223,6 +223,12 @@ public class Evolution extends SoloGame upgradeKit(event.GetPlayer(), false); } + @EventHandler + public void removeToken(PlayerQuitEvent event) + { + _tokens.remove(event.getPlayer().getName()); + } + // //Double Kit // @EventHandler(priority = EventPriority.MONITOR) // public void storeTokens(GameStateChangeEvent event) @@ -414,7 +420,7 @@ public class Evolution extends SoloGame } } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR) public void onKill(CombatDeathEvent event) { event.SetBroadcastType(DeathMessageType.Simple); @@ -747,7 +753,11 @@ public class Evolution extends SoloGame for (int i = 0 ; i < tokens.size() ; i++) { - players.add(tokens.get(i).Player); + Player cur = tokens.get(i).Player; + if (!cur.isOnline()) + continue; + + players.add(cur); } //Award Gems @@ -804,19 +814,14 @@ public class Evolution extends SoloGame Scoreboard.WriteBlank(); - int index = 0; + Scoreboard.Write(C.cYellow + C.Bold + "First to " + _mobKits.size()); + + Scoreboard.WriteBlank(); + for (Player player : GetPlayers(true)) { - if (index > 11) - break; - - Scoreboard.WriteOrdered("Score", C.cGreen + player.getName(), getScore(player), true); - index++; + Scoreboard.WriteOrdered("Score", C.cGreen + player.getName(), getScore(player), true); } - - Scoreboard.WriteBlank(); - - Scoreboard.Write(C.cGold + C.Bold + "First to " + _mobKits.size()); Scoreboard.Draw(); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/trackers/NoAbilityTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/trackers/NoAbilityTracker.java index 655eb6f79..68b0cee22 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/trackers/NoAbilityTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/evolution/trackers/NoAbilityTracker.java @@ -29,6 +29,9 @@ public class NoAbilityTracker extends StatTracker @EventHandler(priority = EventPriority.MONITOR) public void onEvolutionAbility(EvolutionAbilityUseEvent event) { + if (event.isCancelled()) + return; + if (!getGame().IsLive()) return;