mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-04-01 17:05:40 +02:00
Forgot to alter VL.
This commit is contained in:
parent
4ddfcc9063
commit
598896a7cc
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user