mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 03:02:11 +01:00
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:
parent
379fd75068
commit
a85084d54a
@ -3,7 +3,7 @@ name: NoCheatPlugin
|
|||||||
author: Evenprime
|
author: Evenprime
|
||||||
|
|
||||||
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
||||||
version: 0.6.7c
|
version: 0.6.8
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
nocheat:
|
nocheat:
|
||||||
|
@ -15,7 +15,7 @@ public class NoCheatData {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public int movingJumpPhase = 0; // current jumpingPhase
|
public int movingJumpPhase = 0; // current jumpingPhase
|
||||||
public int movingLegitMovesInARow = 0;
|
public long movingLastViolationTime = 0;
|
||||||
public int movingMinorViolationsInARow = 0;
|
public int movingMinorViolationsInARow = 0;
|
||||||
public int movingNormalViolationsInARow = 0;
|
public int movingNormalViolationsInARow = 0;
|
||||||
public int movingHeavyViolationsInARow = 0;
|
public int movingHeavyViolationsInARow = 0;
|
||||||
|
@ -272,7 +272,7 @@ public class MovingCheck {
|
|||||||
}
|
}
|
||||||
else if(vl != null) {
|
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 we haven't already got a setback point, make this location the new setback point
|
||||||
if(data.movingSetBackPoint == null) {
|
if(data.movingSetBackPoint == null) {
|
||||||
@ -346,11 +346,10 @@ public class MovingCheck {
|
|||||||
|
|
||||||
protected static void legitimateMove(NoCheatData data, PlayerMoveEvent event) {
|
protected static void legitimateMove(NoCheatData data, PlayerMoveEvent event) {
|
||||||
|
|
||||||
data.movingLegitMovesInARow++;
|
// 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) {
|
||||||
if(data.movingLegitMovesInARow > 40) {
|
|
||||||
|
|
||||||
data.movingLegitMovesInARow = 0;
|
data.movingLastViolationTime = 0;
|
||||||
|
|
||||||
// Give some additional logs about now ending violations
|
// Give some additional logs about now ending violations
|
||||||
if(data.movingHeavyViolationsInARow > 0) {
|
if(data.movingHeavyViolationsInARow > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user