diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index 7cb274537..da0d8e6cf 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -310,11 +310,9 @@ public class PlayerProfile { /** * Remove experience gains older than a given time * This is used for diminished XP returns - * - * @param age Age in milliseconds that gains older than should be removed */ public void purgeExpiredXpGains() { - SkillXpGain gain = null; + SkillXpGain gain; while ((gain = gainedSkillsXp.poll()) != null) { rollingSkillsXp.put(gain.getSkill(), getRegisteredXpGain(gain.getSkill()) - gain.getXp()); } diff --git a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java index 47b91f8f6..91875c946 100644 --- a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java @@ -53,7 +53,8 @@ public class SelfListener implements Listener { final float rawXp = event.getRawXpGained(); if (rawXp < 0) { - return; // Don't calculate for XP subtraction + // Don't calculate for XP subtraction + return; } Player player = event.getPlayer();