This commit is contained in:
tyuXX 2025-04-03 22:10:59 +03:00
parent f5cfb8a1a7
commit a931152f21
23 changed files with 60 additions and 17 deletions

View file

@ -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");