mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 06:28:52 +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);
|
return listener.getCheats(type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
listener.resetCheck(type);
|
||||||
}
|
}
|
||||||
metrics.start();
|
metrics.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ public class EventListener implements Listener
|
|||||||
|
|
||||||
private void logCheat(CheckType type)
|
private void logCheat(CheckType type)
|
||||||
{
|
{
|
||||||
int x = 0;
|
usageList.put(type, getCheats(type)+1);
|
||||||
if(usageList.get(type) != null)
|
}
|
||||||
{
|
|
||||||
x = usageList.get(type);
|
public void resetCheck(CheckType type)
|
||||||
}
|
{
|
||||||
usageList.put(type, x+1);
|
usageList.put(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCheats(CheckType type)
|
public int getCheats(CheckType type)
|
||||||
|
|||||||
Reference in new issue
Block a user