Merge pull request #5496 from Nightfirecat/fix-opponent-info-npe
opponent info plugin: Fix possible onGameTick NPE
This commit is contained in:
@@ -154,7 +154,9 @@ public class OpponentInfoPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameTick(GameTick gameTick)
|
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)
|
if (Duration.between(lastTime, Instant.now()).compareTo(WAIT) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user