corp: Null checks
This commit is contained in:
@@ -167,7 +167,7 @@ public class CorpPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
NPC npc = npcDespawned.getNpc();
|
NPC npc = npcDespawned.getNpc();
|
||||||
|
|
||||||
if (npc.equals(corp))
|
if (npc != null && npc.equals(corp))
|
||||||
{
|
{
|
||||||
log.debug("Corporeal beast despawn: {}", npc);
|
log.debug("Corporeal beast despawn: {}", npc);
|
||||||
corp = null;
|
corp = null;
|
||||||
@@ -193,7 +193,7 @@ public class CorpPlugin extends Plugin
|
|||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (npc.equals(core))
|
else if (npc != null && npc.equals(core))
|
||||||
{
|
{
|
||||||
core = null;
|
core = null;
|
||||||
}
|
}
|
||||||
@@ -204,7 +204,7 @@ public class CorpPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
Actor actor = hitsplatApplied.getActor();
|
Actor actor = hitsplatApplied.getActor();
|
||||||
|
|
||||||
if (!actor.equals(corp))
|
if (actor != null && !actor.equals(corp))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ public class CorpPlugin extends Plugin
|
|||||||
Actor source = interactingChanged.getSource();
|
Actor source = interactingChanged.getSource();
|
||||||
Actor target = interactingChanged.getTarget();
|
Actor target = interactingChanged.getTarget();
|
||||||
|
|
||||||
if (!target.equals(corp))
|
if (target != null && !target.equals(corp))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user