Prevent game countdown if there is only one player, fix typo on Dog vs Cat challenge.

This commit is contained in:
Thanos paravantis 2015-12-17 20:48:55 +02:00
parent d38276d23d
commit 51c572bf44
2 changed files with 16 additions and 2 deletions

View File

@ -146,6 +146,20 @@ public class MineWare extends SoloGame implements IThrown
new MinewarePinataMasterTracker(this), new MinewareTagMasterTracker(this),
new MinewareKangarooAtHeart(this));
}
@EventHandler
public void onUpdate(UpdateEvent event)
{
if (event.getType() != UpdateType.FASTEST)
return;
if (GetState() == GameState.Recruit && GetCountdown() >= 0 && GetPlayers(false).size() < 2)
{
UtilServer.broadcast(F.main("MineWare", C.cRed + "This game requires at least 2 players to start."));
SetCountdown(-1);
Manager.GetLobby().DisplayWaiting();
}
}
@Override
public void EndCheck()
@ -188,7 +202,7 @@ public class MineWare extends SoloGame implements IThrown
{
return;
}
_challengeTime = System.currentTimeMillis();
}

View File

@ -44,7 +44,7 @@ public class ChallengeDogvsCat extends Challenge
public ChallengeDogvsCat(MineWare host)
{
super(host, ChallengeType.FirstComplete, "Dogs VS Cats", "If you are a dog, bark.", "If you are a dog, meow.", "Look up to bark or meow.", "First team to the end number wins!");
super(host, ChallengeType.FirstComplete, "Dogs VS Cats", "If you are a dog, bark.", "If you are a cat, meow.", "Look up and punch to bark or meow.", "First team to the end number wins!");
}
@Override