runecraft: Use equals when comparing objects

This commit is contained in:
sdburns1998
2019-07-07 18:27:44 +02:00
parent 8f3435efd3
commit d5241f93e1

View File

@@ -353,7 +353,7 @@ public class RunecraftPlugin extends Plugin
public void onNpcDespawned(NpcDespawned event) public void onNpcDespawned(NpcDespawned event)
{ {
final NPC npc = event.getNpc(); final NPC npc = event.getNpc();
if (npc == darkMage) if (npc != null && npc.equals(darkMage))
{ {
darkMage = null; darkMage = null;
} }