1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 01:42:32 +01:00

Hardcore mode won't bring players below level threshold anymore

This commit is contained in:
nossr50
2020-09-16 20:09:59 -07:00
parent 621ccfed34
commit 3badc26806
4 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
package com.gmail.nossr50.util;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.experience.XPGainReason;
import com.gmail.nossr50.datatypes.experience.XPGainSource;
import com.gmail.nossr50.datatypes.party.Party;
@@ -330,7 +332,7 @@ public class EventUtils {
String skillName = primarySkillType.toString();
int playerSkillLevel = playerProfile.getSkillLevel(primarySkillType);
playerProfile.modifySkill(primarySkillType, playerSkillLevel - levelChanged.get(skillName));
playerProfile.modifySkill(primarySkillType, Math.max(Config.getInstance().getHardcoreDeathStatPenaltyLevelThreshold(), playerSkillLevel - levelChanged.get(skillName)));
playerProfile.removeXp(primarySkillType, experienceChanged.get(skillName));
if (playerProfile.getSkillXpLevel(primarySkillType) < 0) {