lizardmenshaman: Merge nested if statements
This commit is contained in:
@@ -102,12 +102,9 @@ public class LizardmenShamanPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onChatMessage(ChatMessage event)
|
public void onChatMessage(ChatMessage event)
|
||||||
{
|
{
|
||||||
if (this.notifyOnSpawn)
|
if (this.notifyOnSpawn && event.getMessage().contains(MESSAGE))
|
||||||
{
|
{
|
||||||
if (event.getMessage().contains(MESSAGE))
|
notifier.notify(MESSAGE);
|
||||||
{
|
|
||||||
notifier.notify(MESSAGE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,12 +117,9 @@ public class LizardmenShamanPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor.getName().equals(SHAMAN) && actor.getAnimation() == 7157)
|
if (actor.getName().equals(SHAMAN) && actor.getAnimation() == 7157 && this.showTimer)
|
||||||
{
|
{
|
||||||
if (this.showTimer)
|
spawns.put(event.getActor().getLocalLocation(), new LizardmenShamanSpawn(8.4, null));
|
||||||
{
|
|
||||||
spawns.put(event.getActor().getLocalLocation(), new LizardmenShamanSpawn(8.4, null));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,12 +63,9 @@ class ShamanSpawnOverlay extends Overlay
|
|||||||
final long startCountdown = Duration.between(spawn.getStart(), now).getSeconds();
|
final long startCountdown = Duration.between(spawn.getStart(), now).getSeconds();
|
||||||
final double certainSec = spawn.getCountdownTimer() - startCountdown;
|
final double certainSec = spawn.getCountdownTimer() - startCountdown;
|
||||||
|
|
||||||
if (certainSec <= 0)
|
if (certainSec <= 0 && spawn.getEnd() == null)
|
||||||
{
|
{
|
||||||
if (spawn.getEnd() == null)
|
spawn.setEnd(Instant.now());
|
||||||
{
|
|
||||||
spawn.setEnd(Instant.now());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final ProgressPieComponent pieComponent = new ProgressPieComponent();
|
final ProgressPieComponent pieComponent = new ProgressPieComponent();
|
||||||
|
|||||||
Reference in New Issue
Block a user