mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Make sure the party leader is online before attempting to notify
This commit is contained in:
parent
b460f7a564
commit
3b794c897d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user