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

This commit is contained in:
nossr50
2020-01-24 18:28:41 -08:00
parent 15d3119627
commit 33f4ac14b5
5 changed files with 4 additions and 3 deletions

View File

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

View File

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

View File

@ -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());
}