Fixed some NPEs

This commit is contained in:
CoderTim 2014-09-03 16:53:29 -04:00
parent d5766d62ae
commit 39b46bc8f5
3 changed files with 12 additions and 6 deletions

View File

@ -38,10 +38,13 @@ public class ParalympicsStatTracker extends StatTracker<Game>
{
List<Player> winners = getGame().getWinners();
for (Player winner : winners)
if (winners != null)
{
if (!_hasLeaped.contains(winner.getUniqueId()))
addStat(winner, "Paralympics", 1, true, false);
for (Player winner : winners)
{
if (!_hasLeaped.contains(winner.getUniqueId()))
addStat(winner, "Paralympics", 1, true, false);
}
}
}
}

View File

@ -32,7 +32,7 @@ public class SharpShooterStatTracker extends StatTracker<Game>
if (event.getEntity().getShooter() instanceof Player && event.getEntity() instanceof Arrow)
{
Player player = (Player) event.getEntity();
Player player = (Player) event.getEntity().getShooter();
Integer count = _arrowsShot.get(player.getUniqueId());
count = (count == null ? 0 : count) + 1;

View File

@ -46,8 +46,11 @@ public class TheComebackStatTracker extends StatTracker<TurfForts>
{
if (_hasWentFiveOrBelow.contains(getGame().WinnerTeam))
{
for (Player player : getGame().getWinners())
addStat(player, "TheComeback", 1, true, false);
if (getGame().getWinners() != null)
{
for (Player player : getGame().getWinners())
addStat(player, "TheComeback", 1, true, false);
}
}
}
}