From 03a1f19df910c91ca7cdd48786f62bc328d612c3 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Mon, 30 Nov 2015 23:49:16 -0600 Subject: [PATCH] Fixed memory leaks in Disguise and Recall. Removed debug messages in ItemMapManager --- .../src/mineplex/core/disguise/DisguiseManager.java | 4 ++-- .../src/mineplex/game/clans/clans/map/ItemMapManager.java | 6 ------ .../minecraft/game/classcombat/Skill/Assassin/Recall.java | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java b/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java index 411c81029..4b39e5a77 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/disguise/DisguiseManager.java @@ -880,8 +880,6 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler @EventHandler public void PlayerQuit(PlayerQuitEvent event) { - undisguise(event.getPlayer()); - for (DisguiseBase disguise : _disguisePlayerMap.keySet()) { _disguisePlayerMap.get(disguise).remove(event.getPlayer()); @@ -891,6 +889,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler { _lastRabbitHop.get(disguise).remove(event.getPlayer().getEntityId()); } + + undisguise(event.getPlayer()); } private void prepareChunk(Location loc) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapManager.java index 4a8532463..1a6268a76 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapManager.java @@ -740,16 +740,13 @@ public class ItemMapManager extends MiniPlugin boolean outsideMap = startingZ < -_halfMapSize; - TimingManager.start("renderMap.scanWorldMap"); scanWorldMap(startingX, startingZ, !outsideMap); - TimingManager.stop("renderMap.scanWorldMap"); if (outsideMap) { return; } - TimingManager.start("renderMap.scale loop"); for (int scale = 1; scale < _scale.size(); scale++) { if (scale == 3 && _loadWorld) @@ -762,11 +759,8 @@ public class ItemMapManager extends MiniPlugin colorWorldHeight(scale, startingX, startingZ); } - TimingManager.stop("renderMap.scale loop"); - TimingManager.start("renderMap.colorWorldHeight 0"); colorWorldHeight(0, startingX, startingZ); - TimingManager.stop("renderMap.colorWorldHeight 0"); } public void scanWorldMap(int startingX, int startingZ, boolean setColors) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java index 81107c694..7aa2a2253 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Recall.java @@ -146,5 +146,6 @@ public class Recall extends Skill public void Reset(Player player) { _locMap.remove(player); + _healthMap.remove(player); } }