From 457754b6f1ea460f7df6cfc9cdb1c3b411ed6830 Mon Sep 17 00:00:00 2001 From: bm01 Date: Sat, 9 Feb 2013 14:35:48 +0100 Subject: [PATCH] Fixed NPE due to null itemShareMode --- src/main/java/com/gmail/nossr50/party/Party.java | 4 ++-- src/main/java/com/gmail/nossr50/party/PartyManager.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/party/Party.java b/src/main/java/com/gmail/nossr50/party/Party.java index ddd9d8248..b4a672bc2 100644 --- a/src/main/java/com/gmail/nossr50/party/Party.java +++ b/src/main/java/com/gmail/nossr50/party/Party.java @@ -12,8 +12,8 @@ public class Party { private String name; private String password; private boolean locked; - private ShareHandler.ShareMode xpShareMode; - private ShareHandler.ShareMode itemShareMode; + private ShareHandler.ShareMode xpShareMode = ShareHandler.ShareMode.NONE; + private ShareHandler.ShareMode itemShareMode = ShareHandler.ShareMode.NONE; public List getMembers() { return members; diff --git a/src/main/java/com/gmail/nossr50/party/PartyManager.java b/src/main/java/com/gmail/nossr50/party/PartyManager.java index 6b0d57832..c0b05525d 100644 --- a/src/main/java/com/gmail/nossr50/party/PartyManager.java +++ b/src/main/java/com/gmail/nossr50/party/PartyManager.java @@ -260,7 +260,6 @@ public final class PartyManager { party.setName(partyName); party.setLeader(player.getName()); - party.setXpShareMode(ShareHandler.ShareMode.NONE); party.setLocked(true); // Parties are now invite-only by default, can be set to open with /party unlock if (password != null) {