From 6908db7976455c5ed0374ad9b13f9de60f2e86dc Mon Sep 17 00:00:00 2001 From: asofold Date: Wed, 24 Oct 2012 17:34:51 +0200 Subject: [PATCH] Reduce added vl for fastbreak by factor 1000, adjust actions. --- .../neatmonster/nocheatplus/checks/blockbreak/FastBreak.java | 5 +++-- src/fr/neatmonster/nocheatplus/config/DefaultConfig.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/checks/blockbreak/FastBreak.java b/src/fr/neatmonster/nocheatplus/checks/blockbreak/FastBreak.java index 2c773f51..ad8ffc2f 100644 --- a/src/fr/neatmonster/nocheatplus/checks/blockbreak/FastBreak.java +++ b/src/fr/neatmonster/nocheatplus/checks/blockbreak/FastBreak.java @@ -76,8 +76,9 @@ public class FastBreak extends Check { // Only raise a violation, if the total penalty score exceeds the contention duration (for lag, delay). if (data.fastBreakPenalties.getScore(cc.fastBreakBucketFactor) > cc.fastBreakBucketContention){ // TODO: maybe add one absolute penalty time for big amounts to stop breaking until then - data.fastBreakVL += missingTime; - final ViolationData vd = new ViolationData(this, player, data.fastBreakVL, missingTime, cc.fastBreakActions); + final double vlAdded = (double) missingTime / 1000.0; + data.fastBreakVL += vlAdded; + final ViolationData vd = new ViolationData(this, player, data.fastBreakVL, vlAdded, cc.fastBreakActions); if (vd.needsParameters()) vd.setParameter(ParameterName.BLOCK_ID, "" + id); cancel = executeActions(vd); } diff --git a/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java index 0baa1d16..41abf112 100644 --- a/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java +++ b/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java @@ -22,7 +22,7 @@ import org.bukkit.Material; public class DefaultConfig extends ConfigFile { /** NCP build needed for this config. */ - public static final int buildNumber = 169; + public static final int buildNumber = 173; /** * Instantiates a new default configuration. @@ -83,7 +83,7 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.BLOCKBREAK_FASTBREAK_CHECK, true); set(ConfPaths.BLOCKBREAK_FASTBREAK_DELAY, 90); set(ConfPaths.BLOCKBREAK_FASTBREAK_MOD_SURVIVAL, 100); - set(ConfPaths.BLOCKBREAK_FASTBREAK_ACTIONS, "cancel vl>500 log:fastbreak:3:5:cif cancel"); + set(ConfPaths.BLOCKBREAK_FASTBREAK_ACTIONS, "cancel vl>0 log:fastbreak:3:5:cif cancel"); set(ConfPaths.BLOCKBREAK_FREQUENCY_CHECK, true); set(ConfPaths.BLOCKBREAK_FREQUENCY_MOD_CREATIVE, 95);