mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Added option to disable gaining Acrobatics XP from dodging lightning
strikes. Fixes #481
This commit is contained in:
parent
6a7f92b4e2
commit
606195c78a
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user