mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Reset stats when they are reported to metrics, that way it doesn't randomly accumulate and then reset.
This commit is contained in:
1 parent
8f840f78c5
commit
9d7d9235fa
2 files changed
+7
-6
No files matched your search
@@ -165,6 +165,7 @@ public class Anticheat extends JavaPlugin
|
||||
return listener.getCheats(type);
|
||||
}
|
||||
});
|
||||
listener.resetCheck(type);
|
||||
}
|
||||
metrics.start();
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ public class EventListener implements Listener
|
||||
|
||||
private void logCheat(CheckType type)
|
||||
{
|
||||
int x = 0;
|
||||
if(usageList.get(type) != null)
|
||||
{
|
||||
x = usageList.get(type);
|
||||
}
|
||||
usageList.put(type, x+1);
|
||||
usageList.put(type, getCheats(type)+1);
|
||||
}
|
||||
|
||||
public void resetCheck(CheckType type)
|
||||
{
|
||||
usageList.put(type, 0);
|
||||
}
|
||||
|
||||
public int getCheats(CheckType type)
|
||||
|
||||
Reference in new issue
Block a user