mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 08:36:45 +01:00
Acrobatics: cap same-location fall counter for XP gain
It used to increase boundlessly, thus preventing players from gaining XP for a while even after moving to another place.
This commit is contained in:
parent
3c6dd290f4
commit
ec1a1deae8
@ -148,7 +148,13 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
fallTries = sameLocation ? fallTries + 1 : Math.max(fallTries - 1, 0);
|
fallTries = sameLocation ? fallTries + 1 : Math.max(fallTries - 1, 0);
|
||||||
lastFallLocation = fallLocation;
|
lastFallLocation = fallLocation;
|
||||||
|
|
||||||
return fallTries > Config.getInstance().getAcrobaticsAFKMaxTries();
|
int maxTries = Config.getInstance().getAcrobaticsAFKMaxTries();
|
||||||
|
|
||||||
|
if (fallTries <= maxTries) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
fallTries = maxTries;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isFatal(double damage) {
|
private boolean isFatal(double damage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user