Fixed memory leaks in Disguise and Recall.
Removed debug messages in ItemMapManager
This commit is contained in:
parent
482ec8a120
commit
03a1f19df9
@ -880,8 +880,6 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void PlayerQuit(PlayerQuitEvent event)
|
public void PlayerQuit(PlayerQuitEvent event)
|
||||||
{
|
{
|
||||||
undisguise(event.getPlayer());
|
|
||||||
|
|
||||||
for (DisguiseBase disguise : _disguisePlayerMap.keySet())
|
for (DisguiseBase disguise : _disguisePlayerMap.keySet())
|
||||||
{
|
{
|
||||||
_disguisePlayerMap.get(disguise).remove(event.getPlayer());
|
_disguisePlayerMap.get(disguise).remove(event.getPlayer());
|
||||||
@ -891,6 +889,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
|
|||||||
{
|
{
|
||||||
_lastRabbitHop.get(disguise).remove(event.getPlayer().getEntityId());
|
_lastRabbitHop.get(disguise).remove(event.getPlayer().getEntityId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
undisguise(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prepareChunk(Location loc)
|
private void prepareChunk(Location loc)
|
||||||
|
@ -740,16 +740,13 @@ public class ItemMapManager extends MiniPlugin
|
|||||||
|
|
||||||
boolean outsideMap = startingZ < -_halfMapSize;
|
boolean outsideMap = startingZ < -_halfMapSize;
|
||||||
|
|
||||||
TimingManager.start("renderMap.scanWorldMap");
|
|
||||||
scanWorldMap(startingX, startingZ, !outsideMap);
|
scanWorldMap(startingX, startingZ, !outsideMap);
|
||||||
TimingManager.stop("renderMap.scanWorldMap");
|
|
||||||
|
|
||||||
if (outsideMap)
|
if (outsideMap)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TimingManager.start("renderMap.scale loop");
|
|
||||||
for (int scale = 1; scale < _scale.size(); scale++)
|
for (int scale = 1; scale < _scale.size(); scale++)
|
||||||
{
|
{
|
||||||
if (scale == 3 && _loadWorld)
|
if (scale == 3 && _loadWorld)
|
||||||
@ -762,11 +759,8 @@ public class ItemMapManager extends MiniPlugin
|
|||||||
|
|
||||||
colorWorldHeight(scale, startingX, startingZ);
|
colorWorldHeight(scale, startingX, startingZ);
|
||||||
}
|
}
|
||||||
TimingManager.stop("renderMap.scale loop");
|
|
||||||
|
|
||||||
TimingManager.start("renderMap.colorWorldHeight 0");
|
|
||||||
colorWorldHeight(0, startingX, startingZ);
|
colorWorldHeight(0, startingX, startingZ);
|
||||||
TimingManager.stop("renderMap.colorWorldHeight 0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void scanWorldMap(int startingX, int startingZ, boolean setColors)
|
public void scanWorldMap(int startingX, int startingZ, boolean setColors)
|
||||||
|
@ -146,5 +146,6 @@ public class Recall extends Skill
|
|||||||
public void Reset(Player player)
|
public void Reset(Player player)
|
||||||
{
|
{
|
||||||
_locMap.remove(player);
|
_locMap.remove(player);
|
||||||
|
_healthMap.remove(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user