Fixing some Maths

This commit is contained in:
nossr50 2012-04-30 07:01:00 -07:00
parent f4f5063efe
commit 8bec50663f
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.gmail.nossr50.listeners;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

View File

@ -14,7 +14,7 @@ public class Hardcore {
for(SkillType st : SkillType.values()) {
if(st.equals(SkillType.ALL))
continue;
int newValue = (int) (PP.getSkillLevel(st) / Config.getInstance().getHardcoreDeathStatPenaltyPercentage());
int newValue = (int) (PP.getSkillLevel(st) - (PP.getSkillLevel(st) / (Config.getInstance().getHardcoreDeathStatPenaltyPercentage() * 0.01D)));
if(newValue < 0)
newValue = 0;