瀏覽代碼

Add mining exploit settings + delegate methods to exploit config

nossr50 6 年之前
父節點
當前提交
3d576eaa6a

+ 19 - 0
src/main/java/com/gmail/nossr50/config/hocon/antiexploit/ConfigSectionExploitMining.java

@@ -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;
+    }
+}

+ 47 - 0
src/main/java/com/gmail/nossr50/config/hocon/antiexploit/ConfigSectionExploitSkills.java

@@ -11,6 +11,9 @@ public class ConfigSectionExploitSkills {
     @Setting(value = "Fishing", comment = "Exploit settings related to Fishing")
     private ConfigSectionExploitFishing configSectionExploitFishing = new ConfigSectionExploitFishing();
 
+    @Setting(value = "Mining", comment = "Exploit settings related to Mining")
+    private ConfigSectionExploitMining configSectionExploitMining = new ConfigSectionExploitMining();
+
     public ConfigSectionExploitAcrobatics getConfigSectionExploitAcrobatics() {
         return configSectionExploitAcrobatics;
     }
@@ -18,4 +21,48 @@ public class ConfigSectionExploitSkills {
     public ConfigSectionExploitFishing getConfigSectionExploitFishing() {
         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();
+    }
 }