mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +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()) {
|
if (!Config.getInstance().getPartyInformAllMembers()) {
|
||||||
Player leader = mcMMO.p.getServer().getPlayer(this.leader);
|
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()) {
|
if (Config.getInstance().getLevelUpSoundsEnabled()) {
|
||||||
leader.playSound(leader.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
leader.playSound(leader.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user