mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-15 08:28:10 +02:00
Rename Stats to Timings and move to stats package.
This commit is contained in:
parent
0496f281b7
commit
67ac214909
@ -11,8 +11,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
import fr.neatmonster.nocheatplus.checks.access.ACheckData;
|
||||
import fr.neatmonster.nocheatplus.checks.access.CheckDataFactory;
|
||||
import fr.neatmonster.nocheatplus.checks.access.ICheckData;
|
||||
import fr.neatmonster.nocheatplus.stats.Timings;
|
||||
import fr.neatmonster.nocheatplus.utilities.ActionFrequency;
|
||||
import fr.neatmonster.nocheatplus.utilities.Stats;
|
||||
|
||||
/**
|
||||
* Player specific data for the block break checks.
|
||||
@ -80,7 +80,7 @@ public class BlockBreakData extends ACheckData {
|
||||
// TODO: use tick here too ?
|
||||
public long wasInstaBreak;
|
||||
|
||||
public final Stats stats;
|
||||
public final Timings stats;
|
||||
|
||||
// Data of the fast break check.
|
||||
public final ActionFrequency fastBreakPenalties;
|
||||
@ -101,7 +101,7 @@ public class BlockBreakData extends ACheckData {
|
||||
|
||||
|
||||
public BlockBreakData(final BlockBreakConfig cc) {
|
||||
stats = cc.fastBreakDebug?(new Stats("NCP/FASTBREAK")):null;
|
||||
stats = cc.fastBreakDebug?(new Timings("NCP/FASTBREAK")):null;
|
||||
fastBreakPenalties = new ActionFrequency(cc.fastBreakBuckets, cc.fastBreakBucketDur);
|
||||
frequencyBuckets = new ActionFrequency(cc.frequencyBuckets, cc.frequencyBucketDur);
|
||||
wrongBlockVL = new ActionFrequency(6, 20000);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package fr.neatmonster.nocheatplus.utilities;
|
||||
package fr.neatmonster.nocheatplus.stats;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
@ -10,11 +10,11 @@ import org.bukkit.ChatColor;
|
||||
import fr.neatmonster.nocheatplus.logging.LogUtil;
|
||||
|
||||
/**
|
||||
* A not too fat stats class re-used from other plugins.
|
||||
* A not too fat timings class re-used from other plugins.
|
||||
* @author asofold
|
||||
*
|
||||
*/
|
||||
public final class Stats {
|
||||
public final class Timings {
|
||||
|
||||
public static final class Entry{
|
||||
public long val = 0;
|
||||
@ -30,7 +30,7 @@ public final class Stats {
|
||||
private boolean logStats = false;
|
||||
private boolean showRange = true;
|
||||
|
||||
private final Map<Integer, Entry> entries = new HashMap<Integer, Stats.Entry>();
|
||||
private final Map<Integer, Entry> entries = new HashMap<Integer, Timings.Entry>();
|
||||
private final DecimalFormat f;
|
||||
private final String label;
|
||||
|
||||
@ -46,11 +46,11 @@ public final class Stats {
|
||||
|
||||
int maxId = 0;
|
||||
|
||||
public Stats(){
|
||||
public Timings(){
|
||||
this("[STATS]");
|
||||
}
|
||||
|
||||
public Stats(final String label){
|
||||
public Timings(final String label){
|
||||
this.label = label;
|
||||
f = new DecimalFormat();
|
||||
f.setGroupingUsed(true);
|
Loading…
Reference in New Issue
Block a user