From 2e74c079b09b43e40ba92de01e038f6f1caada5a Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 18 May 2013 11:37:40 +0200 Subject: [PATCH] Set the enchant buff level to 1 if it's lower than 0 Prevents issue #1006 from happening again. If a user wants to disable SuperBreaker, they should do this using permissions and not by setting the Enchant Buff level to zero. --- src/main/java/com/gmail/nossr50/config/AdvancedConfig.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java index 16e2ecf99..363686369 100644 --- a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java +++ b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java @@ -20,7 +20,10 @@ public class AdvancedConfig extends AutoUpdateConfigLoader { /* GENERAL */ public int getAbilityLength() { return config.getInt("Skills.General.Ability_IncreaseLevel", 50); } - public int getEnchantBuff() { return config.getInt("Skills.General.Ability_EnchantBuff", 5); } + public int getEnchantBuff() { + int buff = config.getInt("Skills.General.Ability_EnchantBuff", 5); + return (buff <= 0) ? 1 : buff; + } /* ACROBATICS */ public double getDodgeChanceMax() { return config.getDouble("Skills.Acrobatics.Dodge_ChanceMax", 20.0D); }