Add mining exploit settings + delegate methods to exploit config

This commit is contained in:
nossr50 2019-05-18 15:45:43 -07:00
parent 087df05e77
commit 3d576eaa6a
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,19 @@
package com.gmail.nossr50.config.hocon.antiexploit;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigSectionExploitMining {
private static final boolean PREVENT_STONE_GENERATOR_XP_DEFAULT = true;
@Setting(value = "Prevent-Stone-Cobblestone-Generator-XP", comment = "Prevents cobblestone/stone formed by lava mixing with water from granting mcMMO XP." +
"\nThis can be automated so that you can stand in place with an autoclicker for easy afk Mining XP." +
"\nThis can be unwanted on a Skyblock server or otherwise, feel free to turn it off." +
"\nDefault value: "+PREVENT_STONE_GENERATOR_XP_DEFAULT)
private boolean preventCobblestoneStoneGeneratorXP = PREVENT_STONE_GENERATOR_XP_DEFAULT;
public boolean isPreventCobblestoneStoneGeneratorXP() {
return preventCobblestoneStoneGeneratorXP;
}
}

View File

@ -11,6 +11,9 @@ public class ConfigSectionExploitSkills {
@Setting(value = "Fishing", comment = "Exploit settings related to Fishing") @Setting(value = "Fishing", comment = "Exploit settings related to Fishing")
private ConfigSectionExploitFishing configSectionExploitFishing = new ConfigSectionExploitFishing(); private ConfigSectionExploitFishing configSectionExploitFishing = new ConfigSectionExploitFishing();
@Setting(value = "Mining", comment = "Exploit settings related to Mining")
private ConfigSectionExploitMining configSectionExploitMining = new ConfigSectionExploitMining();
public ConfigSectionExploitAcrobatics getConfigSectionExploitAcrobatics() { public ConfigSectionExploitAcrobatics getConfigSectionExploitAcrobatics() {
return configSectionExploitAcrobatics; return configSectionExploitAcrobatics;
} }
@ -18,4 +21,48 @@ public class ConfigSectionExploitSkills {
public ConfigSectionExploitFishing getConfigSectionExploitFishing() { public ConfigSectionExploitFishing getConfigSectionExploitFishing() {
return configSectionExploitFishing; return configSectionExploitFishing;
} }
public ConfigSectionExploitMining getConfigSectionExploitMining() {
return configSectionExploitMining;
}
public boolean isPreventCobblestoneStoneGeneratorXP() {
return configSectionExploitMining.isPreventCobblestoneStoneGeneratorXP();
}
public long getFishingRodSpamMilliseconds() {
return configSectionExploitFishing.getFishingRodSpamMilliseconds();
}
public float getOverFishingAreaSize() {
return configSectionExploitFishing.getOverFishingAreaSize();
}
public boolean isPreventFishingExploits() {
return configSectionExploitFishing.isPreventFishingExploits();
}
public int getOverfishingLimit() {
return configSectionExploitFishing.getOverfishingLimit();
}
public boolean isAlertAdminsOnOverFishing() {
return configSectionExploitFishing.isAlertAdminsOnOverFishing();
}
public int getRollXPGainCooldownSeconds() {
return configSectionExploitAcrobatics.getRollXPGainCooldownSeconds();
}
public int getTeleportCooldownSeconds() {
return configSectionExploitAcrobatics.getTeleportCooldownSeconds();
}
public int getAcrobaticLocationLimit() {
return configSectionExploitAcrobatics.getAcrobaticLocationLimit();
}
public boolean isPreventAcrobaticsAbuse() {
return configSectionExploitAcrobatics.isPreventAcrobaticsAbuse();
}
} }