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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user