Fix of a nullpointerexception.

The nullpointerexception happened when, in rare cases, the variable
"lastPlayerLocation" is null and the player is attacked instantly on
login.
This commit is contained in:
GeChallengeM
2019-07-10 00:29:02 +02:00
parent 6ef0476676
commit bc36f8204d

View File

@@ -203,6 +203,10 @@ public class NpcStatusPlugin extends Plugin
private void checkStatus()
{
if (lastPlayerLocation == null)
{
return;
}
for (MemorizedNPC npc : memorizedNPCs)
{
final double CombatTime = npc.getCombatTimerEnd() - client.getTickCount();