mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +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
|
* Remove experience gains older than a given time
|
||||||
* This is used for diminished XP returns
|
* This is used for diminished XP returns
|
||||||
*
|
|
||||||
* @param age Age in milliseconds that gains older than should be removed
|
|
||||||
*/
|
*/
|
||||||
public void purgeExpiredXpGains() {
|
public void purgeExpiredXpGains() {
|
||||||
SkillXpGain gain = null;
|
SkillXpGain gain;
|
||||||
while ((gain = gainedSkillsXp.poll()) != null) {
|
while ((gain = gainedSkillsXp.poll()) != null) {
|
||||||
rollingSkillsXp.put(gain.getSkill(), getRegisteredXpGain(gain.getSkill()) - gain.getXp());
|
rollingSkillsXp.put(gain.getSkill(), getRegisteredXpGain(gain.getSkill()) - gain.getXp());
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,8 @@ public class SelfListener implements Listener {
|
|||||||
|
|
||||||
final float rawXp = event.getRawXpGained();
|
final float rawXp = event.getRawXpGained();
|
||||||
if (rawXp < 0) {
|
if (rawXp < 0) {
|
||||||
return; // Don't calculate for XP subtraction
|
// Don't calculate for XP subtraction
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
Loading…
Reference in New Issue
Block a user