Fix Pumpkin's Revenge crashing on startup
This commit is contained in:
parent
23118d64a1
commit
cf07417b1f
@ -653,6 +653,11 @@ public class Halloween extends SoloGame
|
||||
|
||||
public void playSound(NamedAudio audio)
|
||||
{
|
||||
if (!doVoices)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
if (!_soundOff.contains(player))
|
||||
{
|
||||
|
@ -126,11 +126,11 @@ public class Halloween2016 extends Halloween
|
||||
|
||||
doVoices = false;
|
||||
|
||||
new CompassModule()
|
||||
.setGiveCompass(true)
|
||||
.setGiveCompassToSpecs(true)
|
||||
.setGiveCompassToAlive(false)
|
||||
.register(this);
|
||||
// new CompassModule()
|
||||
// .setGiveCompass(true)
|
||||
// .setGiveCompassToSpecs(true)
|
||||
// .setGiveCompassToAlive(false)
|
||||
// .register(this);
|
||||
}
|
||||
|
||||
public void setObjective(String objective)
|
||||
@ -667,56 +667,56 @@ public class Halloween2016 extends Halloween
|
||||
GetTeamList().add(new GameTeam(this, "Pumpkin Prince", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EndCheck()
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (_wave >= _waves.size())
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin Prince", false, false);
|
||||
Manager.GetGame().AddGems(player, 10, "Participation", false, false);
|
||||
}
|
||||
|
||||
if (Manager.IsRewardItems())
|
||||
{
|
||||
SetCustomWinLine("You earned the Grim Reaper Pet!");
|
||||
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
//Prevent game hopping
|
||||
if (!player.isOnline())
|
||||
continue;
|
||||
|
||||
// PetReward pr = new PetReward(Manager.getCosmeticManager().getPetManager(), Manager.getInventoryManager(), Manager.GetDonation(), "Grim Reaper", "Grim Reaper", PetType.BLAZE, RewardRarity.OTHER, 0, 0);
|
||||
// @Override
|
||||
// public void EndCheck()
|
||||
// {
|
||||
// if (!IsLive())
|
||||
// return;
|
||||
//
|
||||
// if (pr.canGiveReward(player))
|
||||
// {
|
||||
// pr.giveReward(null, player, data -> {});
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
|
||||
SetState(GameState.End);
|
||||
}
|
||||
|
||||
else if (GetPlayers(true).size() == 0)
|
||||
{
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
Manager.GetGame().AddGems(player, 10, "Participation", false, false);
|
||||
}
|
||||
|
||||
AnnounceEnd(this.GetTeamList().get(1));
|
||||
|
||||
SetState(GameState.End);
|
||||
}
|
||||
}
|
||||
// if (_wave >= _waves.size())
|
||||
// {
|
||||
// for (Player player : GetPlayers(false))
|
||||
// {
|
||||
// Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin Prince", false, false);
|
||||
// Manager.GetGame().AddGems(player, 10, "Participation", false, false);
|
||||
// }
|
||||
//
|
||||
// if (Manager.IsRewardItems())
|
||||
// {
|
||||
// SetCustomWinLine("You earned the Grim Reaper Pet!");
|
||||
//
|
||||
// for (Player player : GetPlayers(false))
|
||||
// {
|
||||
// //Prevent game hopping
|
||||
// if (!player.isOnline())
|
||||
// continue;
|
||||
//
|
||||
//// PetReward pr = new PetReward(Manager.getCosmeticManager().getPetManager(), Manager.getInventoryManager(), Manager.GetDonation(), "Grim Reaper", "Grim Reaper", PetType.BLAZE, RewardRarity.OTHER, 0, 0);
|
||||
////
|
||||
//// if (pr.canGiveReward(player))
|
||||
//// {
|
||||
//// pr.giveReward(null, player, data -> {});
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// AnnounceEnd(this.GetTeamList().get(0));
|
||||
//
|
||||
// SetState(GameState.End);
|
||||
// }
|
||||
//
|
||||
// else if (GetPlayers(true).size() == 0)
|
||||
// {
|
||||
// for (Player player : GetPlayers(false))
|
||||
// {
|
||||
// Manager.GetGame().AddGems(player, 10, "Participation", false, false);
|
||||
// }
|
||||
//
|
||||
// AnnounceEnd(this.GetTeamList().get(1));
|
||||
//
|
||||
// SetState(GameState.End);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user