Version bump to 0.6.8 + changes to moving logging: Show log summary

after a certain minimum time of no violations instead of a certain
minimum number of events with no violations.
This commit is contained in:
Evenprime 2011-03-13 14:41:20 +01:00
parent 379fd75068
commit a85084d54a
3 changed files with 6 additions and 7 deletions

View File

@ -3,7 +3,7 @@ name: NoCheatPlugin
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
version: 0.6.7c
version: 0.6.8
commands:
nocheat:

View File

@ -15,7 +15,7 @@ public class NoCheatData {
*/
public int movingJumpPhase = 0; // current jumpingPhase
public int movingLegitMovesInARow = 0;
public long movingLastViolationTime = 0;
public int movingMinorViolationsInARow = 0;
public int movingNormalViolationsInARow = 0;
public int movingHeavyViolationsInARow = 0;

View File

@ -272,7 +272,7 @@ public class MovingCheck {
}
else if(vl != null) {
data.movingLegitMovesInARow = 0;
data.movingLastViolationTime = System.currentTimeMillis();
// If we haven't already got a setback point, make this location the new setback point
if(data.movingSetBackPoint == null) {
@ -346,11 +346,10 @@ public class MovingCheck {
protected static void legitimateMove(NoCheatData data, PlayerMoveEvent event) {
data.movingLegitMovesInARow++;
if(data.movingLegitMovesInARow > 40) {
// Give some logging about violations if the player hasn't done any for at least two seconds
if(data.movingLastViolationTime != 0 && data.movingLastViolationTime < System.currentTimeMillis() + 2000L) {
data.movingLegitMovesInARow = 0;
data.movingLastViolationTime = 0;
// Give some additional logs about now ending violations
if(data.movingHeavyViolationsInARow > 0) {