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:
@@ -203,6 +203,10 @@ public class NpcStatusPlugin extends Plugin
|
|||||||
|
|
||||||
private void checkStatus()
|
private void checkStatus()
|
||||||
{
|
{
|
||||||
|
if (lastPlayerLocation == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (MemorizedNPC npc : memorizedNPCs)
|
for (MemorizedNPC npc : memorizedNPCs)
|
||||||
{
|
{
|
||||||
final double CombatTime = npc.getCombatTimerEnd() - client.getTickCount();
|
final double CombatTime = npc.getCombatTimerEnd() - client.getTickCount();
|
||||||
|
|||||||
Reference in New Issue
Block a user