Apply completion/lost bug fixes

This commit is contained in:
Thanos Paravantis 2016-07-06 17:45:22 +03:00
parent ab4174cfb9
commit 29434b786e

View File

@ -202,13 +202,11 @@ public abstract class Challenge implements Listener
onTimerFinish();
return true;
}
if (alive <= completed)
else if (alive <= completed)
{
return true;
}
if (_type == ChallengeType.LastStanding)
else if (_type == ChallengeType.LastStanding)
{
if (alive <= Settings.getMaxCompletedCount())
{
@ -224,12 +222,9 @@ public abstract class Challenge implements Listener
return true;
}
}
else if (_type == ChallengeType.FirstComplete)
else if (_type == ChallengeType.FirstComplete && completed >= Settings.getMaxCompletedCount())
{
if (completed >= Settings.getMaxCompletedCount())
{
return true;
}
return true;
}
return maxTimeReached;
@ -327,7 +322,7 @@ public abstract class Challenge implements Listener
{
for (Player player : getPlayersAlive())
{
if (Data.hasAnyoneCompleted() && !Data.isCompleted(player))
if (!Data.isDone(player))
{
int lives = Host.lives(player);
@ -443,7 +438,7 @@ public abstract class Challenge implements Listener
if (Data.isDone(player))
return;
if (Host.getPlayersWithRemainingLives() > 1) // Check if the game is not about to end.
if (getPlayersAlive().size() > 1) // Check if the game is not about to end.
{
if (cloak)
{
@ -481,7 +476,7 @@ public abstract class Challenge implements Listener
Data.addLostPlayer(player);
loseLife(player);
if (Host.getPlayersWithRemainingLives() > 1) // Check if the game is not about to end.
if (getPlayersAlive().size() > 1) // Check if the game is not about to end.
{
if (cloak)
{
@ -515,7 +510,7 @@ public abstract class Challenge implements Listener
Host.Manager.GetCondition().Factory().Cloak(reason, player, player, 7777, true, false);
}
protected void alert(Player player, String message)
{
alert(player, message, TITLE_STAY_TICKS);
@ -730,7 +725,7 @@ public abstract class Challenge implements Listener
new BukkitRunnable()
{
private Location loc = hologram.getLocation();
public void run()
{
if (!Host.IsLive() || expiry < System.currentTimeMillis())