From 13951e58063dbec138e530bbbc06c37a2c901dcd Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 27 Mar 2012 19:47:20 -0400 Subject: [PATCH] Fixed NPE due to McMMOPartyChangeEvent. --- .../gmail/nossr50/events/party/McMMOPartyChangeEvent.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/events/party/McMMOPartyChangeEvent.java b/src/main/java/com/gmail/nossr50/events/party/McMMOPartyChangeEvent.java index 09e644f39..f3ff383e2 100644 --- a/src/main/java/com/gmail/nossr50/events/party/McMMOPartyChangeEvent.java +++ b/src/main/java/com/gmail/nossr50/events/party/McMMOPartyChangeEvent.java @@ -14,7 +14,11 @@ public class McMMOPartyChangeEvent extends PlayerEvent implements Cancellable{ public McMMOPartyChangeEvent(Player player, String oldParty, String newParty, EventReason reason) { super(player); - newParty = newParty.replace(":", "."); + + if (newParty != null) { + newParty = newParty.replace(":", "."); + } + this.oldParty = oldParty; this.newParty = newParty; this.reason = reason;