mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Cleanup
This commit is contained in:
parent
5d059d8537
commit
ce3463ad6d
@ -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());
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user