corpplugin: Use equals when comparing objects

This commit is contained in:
sdburns1998
2019-07-07 03:45:18 +02:00
parent a9b162af9a
commit c5b636a264

View File

@@ -167,7 +167,7 @@ public class CorpPlugin extends Plugin
{ {
NPC npc = npcDespawned.getNpc(); NPC npc = npcDespawned.getNpc();
if (npc == corp) if (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 == core) else if (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 != corp) if (!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 (corp == null || target != corp) if (!target.equals(corp))
{ {
return; return;
} }