Merge pull request #269 from runelite-extended/npe
Fix NPE on Login Screen
This commit is contained in:
@@ -196,20 +196,34 @@ public class ZulrahPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onNpcSpawned(NpcSpawned event)
|
public void onNpcSpawned(NpcSpawned event)
|
||||||
{
|
{
|
||||||
NPC npc = event.getNpc();
|
try
|
||||||
if (npc != null && npc.getName().toLowerCase().contains("zulrah"))
|
|
||||||
{
|
{
|
||||||
zulrah = npc;
|
NPC npc = event.getNpc();
|
||||||
|
if (npc != null && npc.getName().toLowerCase().contains("zulrah"))
|
||||||
|
{
|
||||||
|
zulrah = npc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onNpcDespawned(NpcDespawned event)
|
public void onNpcDespawned(NpcDespawned event)
|
||||||
{
|
{
|
||||||
NPC npc = event.getNpc();
|
try
|
||||||
if (npc != null && npc.getName().toLowerCase().contains("zulrah"))
|
|
||||||
{
|
{
|
||||||
zulrah = null;
|
NPC npc = event.getNpc();
|
||||||
|
if (npc != null && npc.getName().toLowerCase().contains("zulrah"))
|
||||||
|
{
|
||||||
|
zulrah = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user