mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-06 15:58:12 +01:00
Remove some no longer needed "lag" detection methods
This commit is contained in:
parent
026d6ef00e
commit
bf7ac37cb1
@ -133,24 +133,12 @@ public class NoCheat extends JavaPlugin implements Listener {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIngameSeconds() {
|
|
||||||
if(lagMeasureTask != null)
|
|
||||||
return lagMeasureTask.getIngameSeconds();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean skipCheck() {
|
public boolean skipCheck() {
|
||||||
if(lagMeasureTask != null)
|
if(lagMeasureTask != null)
|
||||||
return lagMeasureTask.skipCheck();
|
return lagMeasureTask.skipCheck();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getIngameSecondDuration() {
|
|
||||||
if(lagMeasureTask != null)
|
|
||||||
return lagMeasureTask.getIngameSecondDuration();
|
|
||||||
return 1000L;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reloadConfiguration() {
|
public void reloadConfiguration() {
|
||||||
conf.cleanup();
|
conf.cleanup();
|
||||||
this.conf = new ConfigurationManager(this, this.getDataFolder());
|
this.conf = new ConfigurationManager(this, this.getDataFolder());
|
||||||
|
@ -28,7 +28,7 @@ public class LagMeasureTask implements Runnable {
|
|||||||
boolean oldStatus = skipCheck;
|
boolean oldStatus = skipCheck;
|
||||||
// If the previous second took to long, skip checks during
|
// If the previous second took to long, skip checks during
|
||||||
// this second
|
// this second
|
||||||
skipCheck = lastIngamesecondDuration > 1500;
|
skipCheck = lastIngamesecondDuration > 2000;
|
||||||
|
|
||||||
if(plugin.getConfig((World) null).logging.debugmessages) {
|
if(plugin.getConfig((World) null).logging.debugmessages) {
|
||||||
if(oldStatus != skipCheck && skipCheck) {
|
if(oldStatus != skipCheck && skipCheck) {
|
||||||
@ -70,14 +70,6 @@ public class LagMeasureTask implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIngameSeconds() {
|
|
||||||
return ingameseconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getIngameSecondDuration() {
|
|
||||||
return lastIngamesecondDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean skipCheck() {
|
public boolean skipCheck() {
|
||||||
return skipCheck;
|
return skipCheck;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user