Don't send santa messages when the game is dead

This commit is contained in:
Sam 2017-11-28 15:39:32 +00:00 committed by Alexander Meech
parent 3d5164408d
commit d306863a94

View File

@ -552,11 +552,21 @@ public class ChristmasCommon extends SoloGame
public void sendSantaMessage(String message, ChristmasNewAudio audio)
{
if (GetState() == GameState.Dead)
{
return;
}
GetPlayers(false).forEach(player -> sendSantaMessage(player, message, audio));
}
public void sendSantaMessage(Player player, String message, ChristmasNewAudio audio)
{
if (GetState() == GameState.Dead)
{
return;
}
UtilPlayer.playCustomSound(player, audio);
player.sendMessage(getSantaMessage(message));
}