Re-trigger against only if the last run failed.

This probably is too much of a special case (place without interact?),
might rather hit plugin features. Apart from that, consequently, other
checks should test for this too?
This commit is contained in:
asofold 2017-05-01 13:01:57 +02:00
parent 01b311bcd3
commit c21f1075c9

View File

@ -44,7 +44,8 @@ public class Against extends Check {
// Workaround for signs on cactus and similar.
final BlockInteractData bdata = BlockInteractData.getData(player); // TODO: pass as argument.
final Material againstType = blockAgainst.getType();
if (bdata.isConsumedCheck(this.type)) {
if (bdata.isConsumedCheck(this.type) && !bdata.isPassedCheck(this.type)) {
// TODO: Awareness of repeated violation probably is to be implemented below somewhere.
violation = true;
}
bdata.addConsumedCheck(this.type);