mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Fix parties at level cap gaining XP and thus spamming messages
Fixes #4686
This commit is contained in:
parent
dd550feb65
commit
ef714f98c9
@ -1,4 +1,6 @@
|
|||||||
Version 2.1.207
|
Version 2.1.207
|
||||||
|
Fixed an IndexOutOfBounds exception with our BlockTracker
|
||||||
|
Fixed a bug where leveling up a party at level cap would spam the chat with messages
|
||||||
Temporarily rolling required Java version back to 16
|
Temporarily rolling required Java version back to 16
|
||||||
Added unicode (UTF-8) support to locale files (no more UTF-16 codes needed)
|
Added unicode (UTF-8) support to locale files (no more UTF-16 codes needed)
|
||||||
Added locale key 'Scoreboard.Disabled' to en_US
|
Added locale key 'Scoreboard.Disabled' to en_US
|
||||||
|
@ -252,10 +252,10 @@ public class Party {
|
|||||||
SoundManager.sendSound(leader, leader.getLocation(), SoundType.LEVEL_UP);
|
SoundManager.sendSound(leader, leader.getLocation(), SoundType.LEVEL_UP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
} else {
|
||||||
|
PartyManager.informPartyMembersLevelUp(this, levelsGained, getLevel());
|
||||||
}
|
}
|
||||||
|
|
||||||
PartyManager.informPartyMembersLevelUp(this, levelsGained, getLevel());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasReachedLevelCap() {
|
public boolean hasReachedLevelCap() {
|
||||||
|
@ -642,7 +642,7 @@ public class McMMOPlayer implements Identified {
|
|||||||
|
|
||||||
applyXpGain(skill, modifyXpGain(skill, xp), xpGainReason, xpGainSource);
|
applyXpGain(skill, modifyXpGain(skill, xp), xpGainReason, xpGainSource);
|
||||||
|
|
||||||
if (party == null) {
|
if (party == null || party.hasReachedLevelCap()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,6 @@ public final class EventUtils {
|
|||||||
boolean isCancelled = event.isCancelled();
|
boolean isCancelled = event.isCancelled();
|
||||||
|
|
||||||
if (isCancelled) {
|
if (isCancelled) {
|
||||||
|
|
||||||
party.setLevel(party.getLevel() + levelsChanged);
|
party.setLevel(party.getLevel() + levelsChanged);
|
||||||
party.addXp(xpRemoved);
|
party.addXp(xpRemoved);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user