Fixed SheepGame Selfish achievement
This commit is contained in:
parent
d9e1f35985
commit
7d6572ff4d
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user