mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 08:25:07 +00:00
add null check for entity death event for statistics
This commit is contained in:
parent
e7f2d5ce5d
commit
eb9fc7ca37
1 changed files with 6 additions and 3 deletions
|
@ -629,10 +629,13 @@ public class PKListener implements Listener {
|
|||
}
|
||||
}.runTaskLater(ProjectKorra.plugin, 20);
|
||||
}
|
||||
|
||||
StatisticsMethods.addStatisticAbility(event.getAttacker().getUniqueId(), CoreAbility.getAbility(event.getAbility().getName()), com.projectkorra.projectkorra.util.Statistic.PLAYER_KILLS, 1);
|
||||
if (event.getAttacker() != null) {
|
||||
StatisticsMethods.addStatisticAbility(event.getAttacker().getUniqueId(), CoreAbility.getAbility(event.getAbility().getName()), com.projectkorra.projectkorra.util.Statistic.PLAYER_KILLS, 1);
|
||||
}
|
||||
}
|
||||
if (event.getAttacker() != null) {
|
||||
StatisticsMethods.addStatisticAbility(event.getAttacker().getUniqueId(), CoreAbility.getAbility(event.getAbility().getName()), com.projectkorra.projectkorra.util.Statistic.TOTAL_KILLS, 1);
|
||||
}
|
||||
StatisticsMethods.addStatisticAbility(event.getAttacker().getUniqueId(), CoreAbility.getAbility(event.getAbility().getName()), com.projectkorra.projectkorra.util.Statistic.TOTAL_KILLS, 1);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
Loading…
Reference in a new issue