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);
|
return configManager.getConfig(ClueScrollConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void startUp() throws Exception
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown() throws Exception
|
||||||
{
|
{
|
||||||
clearMapPoint();
|
resetClue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -437,7 +432,11 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
clueItemChanged = false;
|
clueItemChanged = false;
|
||||||
clue = null;
|
clue = null;
|
||||||
|
|
||||||
clearMapPoint();
|
if (worldMapPoint != null)
|
||||||
|
{
|
||||||
|
worldMapPointManager.remove(worldMapPoint);
|
||||||
|
worldMapPoint = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (config.displayHintArrows())
|
if (config.displayHintArrows())
|
||||||
{
|
{
|
||||||
@@ -602,13 +601,4 @@ public class ClueScrollPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
worldMapPoint.setWorldPoint(point);
|
worldMapPoint.setWorldPoint(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearMapPoint()
|
|
||||||
{
|
|
||||||
if (worldMapPoint != null)
|
|
||||||
{
|
|
||||||
worldMapPointManager.remove(worldMapPoint);
|
|
||||||
worldMapPoint = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user