Clear previous image components in fight caves overlay

This commit is contained in:
ypperlig
2018-05-11 01:38:41 +02:00
parent 7587ad91a2
commit c9d47864a0

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()))