mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-20 21:13:44 +02:00 
			
		
		
		
	Fix parties at level cap gaining XP and thus spamming messages
Fixes #4686
This commit is contained in:
		| @@ -252,10 +252,10 @@ public class Party { | ||||
|                     SoundManager.sendSound(leader, leader.getLocation(), SoundType.LEVEL_UP); | ||||
|                 } | ||||
|             } | ||||
|             return; | ||||
|         } else { | ||||
|             PartyManager.informPartyMembersLevelUp(this, levelsGained, getLevel()); | ||||
|         } | ||||
|  | ||||
|         PartyManager.informPartyMembersLevelUp(this, levelsGained, getLevel()); | ||||
|     } | ||||
|  | ||||
|     public boolean hasReachedLevelCap() { | ||||
|   | ||||
| @@ -642,7 +642,7 @@ public class McMMOPlayer implements Identified { | ||||
|  | ||||
|         applyXpGain(skill, modifyXpGain(skill, xp), xpGainReason, xpGainSource); | ||||
|  | ||||
|         if (party == null) { | ||||
|         if (party == null || party.hasReachedLevelCap()) { | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -370,7 +370,6 @@ public final class EventUtils { | ||||
|         boolean isCancelled = event.isCancelled(); | ||||
|  | ||||
|         if (isCancelled) { | ||||
|  | ||||
|             party.setLevel(party.getLevel() + levelsChanged); | ||||
|             party.addXp(xpRemoved); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 nossr50
					nossr50