From ce3463ad6d37242f2bed00b3020a4a77b0c56f31 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 27 Oct 2013 12:32:17 +0100 Subject: [PATCH] Cleanup --- .../com/gmail/nossr50/datatypes/player/PlayerProfile.java | 4 +--- src/main/java/com/gmail/nossr50/listeners/SelfListener.java | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) 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();