mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
2.1.147
This commit is contained in:
parent
8451f84083
commit
4005c21810
@ -1,5 +1,5 @@
|
||||
Version 2.1.147
|
||||
|
||||
Fixed a bug where players below the level threshold on a hardcore mode enabled server would gain levels on death in certain circumstances
|
||||
|
||||
Version 2.1.146
|
||||
A bug where players would disconnect from mcMMO messages has been fixed (thanks kashike / read notes)
|
||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.147-SNAPSHOT</version>
|
||||
<version>2.1.147</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<scm>
|
||||
|
@ -331,16 +331,18 @@ public class EventUtils {
|
||||
for (PrimarySkillType primarySkillType : PrimarySkillType.NON_CHILD_SKILLS) {
|
||||
String skillName = primarySkillType.toString();
|
||||
int playerSkillLevel = playerProfile.getSkillLevel(primarySkillType);
|
||||
int threshold = Config.getInstance().getHardcoreDeathStatPenaltyLevelThreshold();
|
||||
if(playerSkillLevel > threshold) {
|
||||
playerProfile.modifySkill(primarySkillType, Math.max(threshold, playerSkillLevel - levelChanged.get(skillName)));
|
||||
playerProfile.removeXp(primarySkillType, experienceChanged.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) {
|
||||
playerProfile.setSkillXpLevel(primarySkillType, 0);
|
||||
}
|
||||
|
||||
if (playerProfile.getSkillXpLevel(primarySkillType) < 0) {
|
||||
playerProfile.setSkillXpLevel(primarySkillType, 0);
|
||||
}
|
||||
|
||||
if (playerProfile.getSkillLevel(primarySkillType) < 0) {
|
||||
playerProfile.modifySkill(primarySkillType, 0);
|
||||
if (playerProfile.getSkillLevel(primarySkillType) < 0) {
|
||||
playerProfile.modifySkill(primarySkillType, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user