Fixed SheepGame Selfish achievement

This commit is contained in:
CoderTim 2014-08-26 20:27:39 -04:00
parent d9e1f35985
commit 7d6572ff4d
2 changed files with 7 additions and 15 deletions

View File

@ -518,15 +518,7 @@ public class SheepGame extends TeamGame
//Write New
for (GameTeam team : _sheepPens.keySet())
{
int score = 0;
for (Sheep sheep : _sheep.keySet())
{
if (_sheepPens.get(team).contains(sheep.getLocation().getBlock()))
{
score++;
}
}
int score = getSheepCount(team);
Scoreboard.WriteOrdered("Sheep", team.GetColor() + team.GetName(), score, true);
@ -682,14 +674,14 @@ public class SheepGame extends TeamGame
public int getSheepCount(GameTeam team)
{
int count = 0;
int score = 0;
for (SheepData data : _sheep.values())
for (Sheep sheep : _sheep.keySet())
{
if (data.HolderTeam == team)
count++;
if (_sheepPens.get(team).contains(sheep.getLocation().getBlock()))
score++;
}
return count;
return score;
}
}

View File

@ -23,7 +23,7 @@ public class ParalympicsStatTracker extends StatTracker<Game>
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onePerkLeap(PerkLeapEvent event)
public void onPerkLeap(PerkLeapEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;