add proper config check, expand guard case (#1434)

This commit is contained in:
Netami1
2019-08-24 18:06:57 -04:00
committed by Ganom
parent b680854c46
commit 66f85ccbde

View File

@@ -75,14 +75,19 @@ public class CoxInfoBox extends Overlay
{ {
prayAgainstPanel.getChildren().clear(); prayAgainstPanel.getChildren().clear();
final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm(); if (!plugin.isConfigPrayAgainstOlm())
if (plugin.getPrayAgainstOlm() == null && !plugin.isConfigPrayAgainstOlm())
{ {
return null; return null;
} }
if (System.currentTimeMillis() < (plugin.getLastPrayTime() + 120000) && plugin.getPrayAgainstOlm() != null) final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm();
if (prayAgainst == null)
{
return null;
}
if (System.currentTimeMillis() < plugin.getLastPrayTime() + 120000)
{ {
final int scale = plugin.getPrayAgainstSize(); final int scale = plugin.getPrayAgainstSize();
InfoBoxComponent prayComponent = new InfoBoxComponent(); InfoBoxComponent prayComponent = new InfoBoxComponent();