diff --git a/src/main/java/com/gmail/nossr50/datatypes/party/Party.java b/src/main/java/com/gmail/nossr50/datatypes/party/Party.java index f9b5c0a5d..23e1893ef 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/party/Party.java +++ b/src/main/java/com/gmail/nossr50/datatypes/party/Party.java @@ -207,10 +207,12 @@ public class Party { if (!Config.getInstance().getPartyInformAllMembers()) { Player leader = mcMMO.p.getServer().getPlayer(this.leader); - leader.sendMessage(LocaleLoader.getString("Party.LevelUp", levelsGained, getLevel())); + if (leader != null) { + leader.sendMessage(LocaleLoader.getString("Party.LevelUp", levelsGained, getLevel())); - if (Config.getInstance().getLevelUpSoundsEnabled()) { - leader.playSound(leader.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH); + if (Config.getInstance().getLevelUpSoundsEnabled()) { + leader.playSound(leader.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH); + } } return; }