runecraft: Use equals when comparing objects
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user