mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-01 05:18:00 +01:00
Updated defaults/limits, lag warning, really compile against CB 1.1 R3
This commit is contained in:
parent
273add2139
commit
a9839ca6d6
4
pom.xml
4
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cc.co.evenprime.bukkit</groupId>
|
||||
<artifactId>NoCheat</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.0.1</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>NoCheat</name>
|
||||
<properties>
|
||||
@ -13,7 +13,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.1-R4-SNAPSHOT</version>
|
||||
<version>1.1-R3-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
@ -43,7 +43,7 @@ public class MovingConfig implements ConfigItem {
|
||||
|
||||
runflyCheck = data.getBoolean(ConfPaths.MOVING_RUNFLY_CHECK);
|
||||
walkingSpeedLimit = ((double) 22) / 100D;
|
||||
sprintingSpeedLimit = ((double) 40) / 100D;
|
||||
sprintingSpeedLimit = ((double) 35) / 100D;
|
||||
jumpheight = ((double) 135) / 100D;
|
||||
actions = data.getActionList(ConfPaths.MOVING_RUNFLY_ACTIONS);
|
||||
|
||||
|
@ -7,7 +7,7 @@ public class LagMeasureTask implements Runnable {
|
||||
private int ingameseconds = 1;
|
||||
private long lastIngamesecondTime = System.currentTimeMillis();
|
||||
private long lastIngamesecondDuration = 2000L;
|
||||
private boolean skipCheck = true;
|
||||
private boolean skipCheck = false;
|
||||
private int lagMeasureTaskId = -1;
|
||||
|
||||
private final NoCheat plugin;
|
||||
@ -24,9 +24,17 @@ public class LagMeasureTask implements Runnable {
|
||||
public void run() {
|
||||
|
||||
try {
|
||||
boolean oldStatus = skipCheck;
|
||||
// If the previous second took to long, skip checks during
|
||||
// this second
|
||||
skipCheck = lastIngamesecondDuration > 1500;
|
||||
|
||||
if(oldStatus != skipCheck && skipCheck) {
|
||||
System.out.println("[NoCheat] detected server lag, some checks will not work.");
|
||||
}
|
||||
else if(oldStatus != skipCheck && !skipCheck) {
|
||||
System.out.println("[NoCheat] server lag seems to have stopped, reenabling checks.");
|
||||
}
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
lastIngamesecondDuration = time - lastIngamesecondTime;
|
||||
|
Loading…
Reference in New Issue
Block a user