mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
2.1.33
This commit is contained in:
@ -547,8 +547,6 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getWoodcuttingGate() { return config.getInt("Skills.Woodcutting.Ability_Activation_Level_Gate", 10); }
|
||||
|
||||
/* AFK Leveling */
|
||||
public boolean getAcrobaticsPreventAFK() { return config.getBoolean("Skills.Acrobatics.Prevent_AFK_Leveling", true); }
|
||||
public int getAcrobaticsAFKMaxTries() { return config.getInt("Skills.Acrobatics.Max_Tries_At_Same_Location", 3); }
|
||||
public boolean getHerbalismPreventAFK() { return config.getBoolean("Skills.Herbalism.Prevent_AFK_Leveling", true); }
|
||||
|
||||
/* Level Caps */
|
||||
|
@ -145,6 +145,8 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
public boolean isEndermanEndermiteFarmingPrevented() { return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true); }
|
||||
|
||||
public boolean isFishingExploitingPrevented() { return config.getBoolean("ExploitFix.Fishing", true); }
|
||||
public boolean isAcrobaticsExploitingPrevented() { return config.getBoolean("ExploitFix.Acrobatics", true); }
|
||||
|
||||
/* Curve settings */
|
||||
public FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve")); }
|
||||
public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience_Formula.Cumulative_Curve", false); }
|
||||
|
@ -272,7 +272,7 @@ public class Roll extends AcrobaticsSubSkill {
|
||||
* @return true if exploits are detected, false otherwise
|
||||
*/
|
||||
private boolean isExploiting(Player player) {
|
||||
if (!Config.getInstance().getAcrobaticsPreventAFK()) {
|
||||
if (!ExperienceConfig.getInstance().isAcrobaticsExploitingPrevented()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.skills.acrobatics;
|
||||
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
@ -14,6 +15,7 @@ import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||
import com.gmail.nossr50.util.skills.RankUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillActivationType;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import com.sun.deploy.config.Config;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LightningStrike;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -30,6 +32,9 @@ public class AcrobaticsManager extends SkillManager {
|
||||
|
||||
public boolean canGainRollXP()
|
||||
{
|
||||
if(!ExperienceConfig.getInstance().isAcrobaticsExploitingPrevented())
|
||||
return true;
|
||||
|
||||
if(System.currentTimeMillis() >= rollXPCooldown)
|
||||
{
|
||||
rollXPCooldown = System.currentTimeMillis() + rollXPInterval;
|
||||
|
Reference in New Issue
Block a user