mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Added option to disable gaining Acrobatics XP from dodging lightning
strikes. Fixes #481
This commit is contained in:
@ -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");
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user