mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
Add options for Fishing exploit prevention
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user