Selaa lähdekoodia

Add toggle for snow golem exploit to experience.yml - SnowGolemExcavation

nossr50 5 vuotta sitten
vanhempi
sitoutus
33f4ac14b5

+ 1 - 1
pom.xml

@@ -2,7 +2,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.gmail.nossr50.mcMMO</groupId>
     <artifactId>mcMMO</artifactId>
-    <version>2.1.113</version>
+    <version>2.1.114-SNAPSHOT</version>
     <name>mcMMO</name>
     <url>https://github.com/mcMMO-Dev/mcMMO</url>
     <scm>

+ 1 - 0
src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java

@@ -144,6 +144,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
      */
 
     /* EXPLOIT TOGGLES */
+    public boolean isSnowExploitPrevented() { return config.getBoolean("SnowGolemExcavation", true); }
     public boolean isEndermanEndermiteFarmingPrevented() { return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true); }
     public boolean isPistonCheatingPrevented() { return config.getBoolean("ExploitFix.PistonCheating", true); }
     public boolean isPistonExploitPrevented() { return config.getBoolean("ExploitFix.Pistons", false); }

+ 0 - 1
src/main/java/com/gmail/nossr50/datatypes/skills/SuperAbilityType.java

@@ -3,7 +3,6 @@ package com.gmail.nossr50.datatypes.skills;
 import com.gmail.nossr50.config.Config;
 import com.gmail.nossr50.mcMMO;
 import com.gmail.nossr50.util.BlockUtils;
-import com.gmail.nossr50.util.MaterialMapStore;
 import com.gmail.nossr50.util.Permissions;
 import com.gmail.nossr50.util.StringUtils;
 import org.bukkit.Material;

+ 1 - 1
src/main/java/com/gmail/nossr50/listeners/BlockListener.java

@@ -178,7 +178,7 @@ public class BlockListener implements Listener {
 
         BlockState blockState = event.getNewState();
 
-        if(BlockUtils.shouldBeWatched(blockState))
+        if(ExperienceConfig.getInstance().isSnowExploitPrevented() && BlockUtils.shouldBeWatched(blockState))
         {
             mcMMO.getPlaceStore().setTrue(blockState.getBlock());
         }

+ 1 - 0
src/main/resources/experience.yml

@@ -34,6 +34,7 @@ ExploitFix:
     LavaStoneAndCobbleFarming: true
     TreeFellerReducedXP: true
     PistonCheating: true
+    SnowGolemExcavation: true
 Experience_Bars:
     # Turn this to false if you wanna disable XP bars
     Enable: true