Add options for Fishing exploit prevention

This commit is contained in:
nossr50
2019-03-14 18:50:12 -07:00
parent 0d8b4c5f5f
commit efdd56684b
3 changed files with 28 additions and 0 deletions

View File

@ -41,6 +41,8 @@ public class ConfigExploitPrevention {
@Setting(value = "Acrobatics", comment = "Exploit settings related to Acrobatics")
private ConfigSectionExploitAcrobatics configSectionExploitAcrobatics = new ConfigSectionExploitAcrobatics();
@Setting(value = "Fishing", comment = "Exploit settings related to Fishing")
private ConfigSectionExploitFishing configSectionExploitFishing = new ConfigSectionExploitFishing();
public boolean getEndermenEndermiteFix() {
return endermenEndermiteFix;
@ -61,4 +63,8 @@ public class ConfigExploitPrevention {
public ConfigSectionExploitAcrobatics getConfigSectionExploitAcrobatics() {
return configSectionExploitAcrobatics;
}
public ConfigSectionExploitFishing getConfigSectionExploitFishing() {
return configSectionExploitFishing;
}
}

View File

@ -0,0 +1,21 @@
package com.gmail.nossr50.config.hocon.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionExploitFishing {
private static final boolean PREVENT_FISHING_EXPLOITS_DEFAULT = true;
@Setting(value = "Prevent-Fishing-AFK-Farming",
comment = "Prevents many methods for automatically farming Fishing XP." +
"\nSuch as farming in the same spot more than once." +
"\nSpam-click fishing." +
"\nDefault value: "+PREVENT_FISHING_EXPLOITS_DEFAULT)
private boolean preventFishingExploits = PREVENT_FISHING_EXPLOITS_DEFAULT;
public boolean isPreventFishingExploits() {
return preventFishingExploits;
}
}