Fixed some NPEs
This commit is contained in:
parent
d5766d62ae
commit
39b46bc8f5
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user