Merge pull request #5496 from Nightfirecat/fix-opponent-info-npe

opponent info plugin: Fix possible onGameTick NPE
This commit is contained in:
Tomas Slusny
2018-09-15 05:36:33 +02:00
committed by GitHub

View File

@@ -154,7 +154,9 @@ public class OpponentInfoPlugin extends Plugin
@Subscribe
public void onGameTick(GameTick gameTick)
{
if (lastOpponent != null && client.getLocalPlayer().getInteracting() == null)
if (lastOpponent != null
&& lastTime != null
&& client.getLocalPlayer().getInteracting() == null)
{
if (Duration.between(lastTime, Instant.now()).compareTo(WAIT) > 0)
{