From 0188629fe20e1ebbbcc73afe8f9c953d47558ab0 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 25 Oct 2014 17:33:55 +0200 Subject: [PATCH] Should add these to the hash map to prevent a NPE Fixes #2333 --- src/main/java/com/gmail/nossr50/util/HardcoreManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/util/HardcoreManager.java b/src/main/java/com/gmail/nossr50/util/HardcoreManager.java index b8119096b..b20085a1e 100644 --- a/src/main/java/com/gmail/nossr50/util/HardcoreManager.java +++ b/src/main/java/com/gmail/nossr50/util/HardcoreManager.java @@ -34,6 +34,8 @@ public final class HardcoreManager { int playerSkillXpLevel = playerProfile.getSkillXpLevel(skillType); if (playerSkillLevel <= 0 || playerSkillLevel <= levelThreshold) { + levelChanged.put(skillType.toString(), 0); + experienceChanged.put(skillType.toString(), 0F); continue; } @@ -75,6 +77,8 @@ public final class HardcoreManager { int victimSkillLevel = victimProfile.getSkillLevel(skillType); if (victimSkillLevel <= 0 || victimSkillLevel < killerSkillLevel / 2 || victimSkillLevel <= levelThreshold) { + levelChanged.put(skillType.toString(), 0); + experienceChanged.put(skillType.toString(), 0F); continue; }