From 598896a7cc19017818a44b2b375548a9145933d6 Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 16 Feb 2014 22:31:09 +0100 Subject: [PATCH] Forgot to alter VL. --- .../fr/neatmonster/nocheatplus/checks/blockplace/Against.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Against.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Against.java index a7b1742c..be26bd03 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Against.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Against.java @@ -23,7 +23,7 @@ public class Against extends Check { public boolean check(final Player player, final Block block, final Material mat, final Block blockAgainst, final BlockPlaceData data, final BlockPlaceConfig cc) { boolean violation = false; - // TODO: Maybe make it an extra check after all. + // TODO: Make more precise (workarounds like WATER_LILY, general points). final int againstId = blockAgainst.getTypeId(); if (BlockProperties.isLiquid(againstId)) { if ((mat != Material.WATER_LILY || !BlockProperties.isLiquid(block.getRelative(BlockFace.DOWN).getTypeId()))) { @@ -35,10 +35,12 @@ public class Against extends Check { } // Handle violation and return. if (violation) { + data.againstVL += 1.0; final ViolationData vd = new ViolationData(this, player, data.againstVL, 1, cc.againstActions); vd.setParameter(ParameterName.BLOCK_ID, Integer.toString(mat.getId())); return executeActions(vd); } else { + data.againstVL *= 100; // Assume one false positive every 100 blocks. return false; } }