Check for localMember in party not being null on UserJoin

Local user joins last, so all UserJoin events before that will throw NPE
here.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-02-01 20:54:22 +01:00
parent a0a86a9f78
commit 92427968b0

View File

@@ -354,7 +354,9 @@ public class PartyPlugin extends Plugin implements KeyListener
.runeLiteFormattedMessage(joinMessage)
.build());
if (partyData.getMemberId().equals(party.getLocalMember().getMemberId()))
final PartyMember localMember = party.getLocalMember();
if (localMember != null && partyData.getMemberId().equals(localMember.getMemberId()))
{
final String helpMessage = new ChatMessageBuilder()
.append(ChatColorType.HIGHLIGHT)