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();
final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm();
if (plugin.getPrayAgainstOlm() == null && !plugin.isConfigPrayAgainstOlm())
if (!plugin.isConfigPrayAgainstOlm())
{
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();
InfoBoxComponent prayComponent = new InfoBoxComponent();