diff --git a/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java index 42cca7c44..c4ebf3215 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java @@ -125,7 +125,7 @@ public class McMMOPlayer { return 0; } - if ((skillType.getMaxLevel() < profile.getSkillLevel(skillType) + 1) || (Misc.getPowerLevelCap() < getPowerLevel() + 1)) { + if ((skillType.getMaxLevel() < profile.getSkillLevel(skillType) + 1) || (Config.getInstance().getPowerLevelCap() < getPowerLevel() + 1)) { return 0; } diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java index 5ce8a0758..dcf053a19 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java @@ -239,7 +239,7 @@ public class SkillTools { if (profile.getSkillXpLevel(skillType) >= profile.getXpToLevel(skillType)) { while (profile.getSkillXpLevel(skillType) >= profile.getXpToLevel(skillType)) { - if ((skillType.getMaxLevel() >= profile.getSkillLevel(skillType) + 1) && (Misc.getPowerLevelCap() >= Users.getPlayer(player).getPowerLevel() + 1)) { + if ((skillType.getMaxLevel() >= profile.getSkillLevel(skillType) + 1) && (Config.getInstance().getPowerLevelCap() >= Users.getPlayer(player).getPowerLevel() + 1)) { int xp = profile.getXpToLevel(skillType); xpRemoved += xp; diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index fac7f02c4..89b0e9d0e 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -247,21 +247,6 @@ public final class Misc { newItem.setItemStack(cloned); } - /** - * Get the max power level for a player. - * - * @return the maximum power level for a player - */ - public static int getPowerLevelCap() { - int levelCap = Config.getInstance().getPowerLevelCap(); - - if (levelCap > 0) { - return levelCap; - } - - return Integer.MAX_VALUE; - } - public static Random getRandom() { return random; }