Added option to disable gaining Acrobatics XP from dodging lightning

strikes. Fixes #481
This commit is contained in:
GJ 2013-01-13 16:03:49 -05:00
parent 6a7f92b4e2
commit 606195c78a
3 changed files with 9 additions and 0 deletions

View File

@ -268,6 +268,9 @@ public class Config extends ConfigLoader {
public boolean getAcrobaticsAFKDisabled() { return config.getBoolean("Skills.Acrobatics.Prevent_AFK_Leveling", true); }
public boolean getHerbalismAFKDisabled() { return config.getBoolean("Skills.Herbalism.Prevent_AFK_Leveling", true); }
/* Dogde Lightning */
public boolean getDodgeLightningDisabled() {return config.getBoolean("Skills.Acrobatics.Prevent_Dodge_Lightning", false); }
/* Level Caps */
public int getLevelCapAcrobatics() {
return getLevelCap("Skills.Acrobatics.Level_Cap");

View File

@ -8,6 +8,7 @@ import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.LightningStrike;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Skeleton;
@ -221,6 +222,10 @@ public class Combat {
}
if (configInstance.getAcrobaticsPVE()) {
if (damager instanceof LightningStrike && configInstance.getDodgeLightningDisabled()) {
return;
}
acroManager.dodgeCheck(event);
}
}

View File

@ -102,6 +102,7 @@ Skills:
Enabled_For_PVP: true
Enabled_For_PVE: true
Prevent_AFK_Leveling: true
Prevent_Dodge_Lightning: false
Level_Cap: 0
Archery:
Enabled_For_PVP: true