Merge clearMapPoint with resetClue

- Move logic from clearMapPoint to resetClue
- Call resetClue on plugin shutdown

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-05-11 19:37:33 +02:00
parent 202d04be43
commit bf9a019c2f

View File

@@ -173,15 +173,10 @@ public class ClueScrollPlugin extends Plugin
return configManager.getConfig(ClueScrollConfig.class);
}
@Override
protected void startUp() throws Exception
{
}
@Override
protected void shutDown() throws Exception
{
clearMapPoint();
resetClue();
}
@Override
@@ -437,7 +432,11 @@ public class ClueScrollPlugin extends Plugin
clueItemChanged = false;
clue = null;
clearMapPoint();
if (worldMapPoint != null)
{
worldMapPointManager.remove(worldMapPoint);
worldMapPoint = null;
}
if (config.displayHintArrows())
{
@@ -602,13 +601,4 @@ public class ClueScrollPlugin extends Plugin
}
worldMapPoint.setWorldPoint(point);
}
private void clearMapPoint()
{
if (worldMapPoint != null)
{
worldMapPointManager.remove(worldMapPoint);
worldMapPoint = null;
}
}
}