Update
This commit is contained in:
parent
f5cfb8a1a7
commit
a931152f21
23 changed files with 60 additions and 17 deletions
|
|
@ -63,7 +63,13 @@ public class PlayerTitleManager {
|
|||
}
|
||||
}
|
||||
public static void checkForTotalKills(Player player) {
|
||||
long totalKills = (long) PlayerStats.getPlayerStats(player).getStat("total_kill_count");
|
||||
Object totalKillsObj = PlayerStats.getPlayerStats(player).getStat("total_kill_count");
|
||||
long totalKills;
|
||||
if (totalKillsObj instanceof Integer) {
|
||||
totalKills = ((Integer) totalKillsObj).longValue();
|
||||
} else {
|
||||
totalKills = (Long) totalKillsObj;
|
||||
}
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (totalKills > 100) {
|
||||
playerTitles.addTitle("KillingMachine");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue