mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-04 11:11:10 +02:00
Added option to set time between summaries
This commit is contained in:
parent
243cea5102
commit
978afb76cf
|
@ -3,7 +3,7 @@ name: NoCheat
|
|||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||
version: 1.09b
|
||||
version: 1.09c
|
||||
|
||||
softdepend: [ Permissions, CraftIRC ]
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class MovingCheck extends Check {
|
|||
runningCheck = new RunningCheck();
|
||||
}
|
||||
|
||||
private final int ticksBeforeSummary = 100;
|
||||
private int ticksBeforeSummary;
|
||||
|
||||
public long statisticElapsedTimeNano = 0;
|
||||
|
||||
|
@ -508,6 +508,8 @@ public class MovingCheck extends Check {
|
|||
replace("[timeframe]", "%2$d").
|
||||
replace("[player]", "%1$s").
|
||||
replace("[violations]", "(%3$d,%4$d,%5$d)");
|
||||
|
||||
ticksBeforeSummary = config.getIntegerValue("moving.summaryafter")*20;
|
||||
|
||||
actions = new Action[3][];
|
||||
|
||||
|
|
|
@ -157,6 +157,9 @@ public class NoCheatConfiguration {
|
|||
|
||||
movingNode.add(new LongStringOption("summarymessage",
|
||||
SimpleYaml.getString("moving.summarymessage", "Moving summary of last ~[timeframe] seconds: [player] total Violations: [violations]", yamlContent)));
|
||||
|
||||
movingNode.add(new IntegerOption("summaryafter",
|
||||
SimpleYaml.getInt("moving.summaryafter", 15, yamlContent)));
|
||||
|
||||
movingNode.add(new BooleanOption("allowflying",
|
||||
SimpleYaml.getBoolean("moving.allowflying", false, yamlContent)));
|
||||
|
|
|
@ -110,6 +110,8 @@ public class Explainations {
|
|||
"[player] will be replaced with the name of the player,\n" +
|
||||
"[timeframe] will be replaced with the number of seconds that were observed,\n" +
|
||||
"[violations] will be replaced with the number of violations of each severeness during that time.");
|
||||
set("moving.summaryafter", "After how many seconds should a summary of all violations in that timeframe\n" +
|
||||
"be displayed?");
|
||||
set("moving.allowflying", "If true, all players are allowed to fly (at normal walking speeds)\n" +
|
||||
"(Permissions plugin): Players with permission 'nocheat.flying' are allowed to fly independent of\n" +
|
||||
"the setting of this option.");
|
||||
|
|
Loading…
Reference in New Issue
Block a user