Merge pull request #10123 from dekvall/random-event-npe
random events: fix npe on login
This commit is contained in:
@@ -118,7 +118,11 @@ public class RandomEventPlugin extends Plugin
|
|||||||
|
|
||||||
// Check that the npc is interacting with the player and the player isn't interacting with the npc, so
|
// Check that the npc is interacting with the player and the player isn't interacting with the npc, so
|
||||||
// that the notification doesn't fire from talking to other user's randoms
|
// that the notification doesn't fire from talking to other user's randoms
|
||||||
if (target != player || player.getInteracting() == source || !(source instanceof NPC) || !EVENT_NPCS.contains(((NPC) source).getId()))
|
if (player == null
|
||||||
|
|| target != player
|
||||||
|
|| player.getInteracting() == source
|
||||||
|
|| !(source instanceof NPC)
|
||||||
|
|| !EVENT_NPCS.contains(((NPC) source).getId()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user