Merge pull request #2578 from ypperlig/fightcavesoverlayfix

Clear previous image components in fight caves overlay
This commit is contained in:
Tomas Slusny
2018-05-11 08:50:17 +02:00
committed by GitHub

View File

@@ -64,11 +64,15 @@ public class FightCaveOverlay extends Overlay
public Dimension render(Graphics2D graphics)
{
JadAttack attack = plugin.getAttack();
if (attack == null)
{
return null;
}
BufferedImage prayerImage = getPrayerImage(attack);
imagePanelComponent.getChildren().clear();
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));
if (!client.isPrayerActive(attack.getPrayer()))