Modify Metrics data & fix

This commit is contained in:
Rammelkast committed 2017-03-03 12:40:30 +01:00
1 parent 09ddbfba8f
commit dd8c495ee6
3 files changed
+23 -5

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.rammelkast.anticheatreloaded</groupId> <groupId>com.rammelkast.anticheatreloaded</groupId>
<artifactId>AntiCheatReloaded</artifactId> <artifactId>AntiCheatReloaded</artifactId>
<version>1.6.1-ALPHA</version> <version>1.6.2-ALPHA</version>
<name>AntiCheatReloaded</name> <name>AntiCheatReloaded</name>
<url>https://rammelkast.com</url> <url>https://rammelkast.com</url>
<properties> <properties>
@@ -81,6 +81,9 @@ public class AntiCheat extends JavaPlugin {
KillAuraCheck.listenPackets(); KillAuraCheck.listenPackets();
BlinkCheck.startTimer(); BlinkCheck.startTimer();
BlinkCheck.listenPackets(); BlinkCheck.listenPackets();
} else {
getLogger().severe("Shutting down, ProtocolLib not found!");
Bukkit.getPluginManager().disablePlugin(this);
} }
// Check if other AC's are installed // Check if other AC's are installed
@@ -120,19 +123,34 @@ public class AntiCheat extends JavaPlugin {
metrics.addCustomChart(new Metrics.SingleLineChart("cheaters_kicked") { metrics.addCustomChart(new Metrics.SingleLineChart("cheaters_kicked") {
@Override @Override
public int getValue() { public int getValue() {
return playersKicked; int kicked = playersKicked;
// Reset so we don't keep sending the same value
playersKicked = 0;
return kicked;
} }
}); });
metrics.addCustomChart(new Metrics.SingleLineChart("killaura_violations") { metrics.addCustomChart(new Metrics.SingleLineChart("killaura_violations") {
@Override @Override
public int getValue() { public int getValue() {
return killauraViolations; int violations = killauraViolations;
// Reset so we don't keep sending the same value
killauraViolations = 0;
return violations;
} }
}); });
metrics.addCustomChart(new Metrics.SingleLineChart("glide_violations") { metrics.addCustomChart(new Metrics.SingleLineChart("glide_violations") {
@Override @Override
public int getValue() { public int getValue() {
return glideViolations; int violations = glideViolations;
// Reset so we don't keep sending the same value
glideViolations = 0;
return violations;
}
});
metrics.addCustomChart(new Metrics.SimplePie("protocollib_version") {
@Override
public String getValue() {
return Bukkit.getPluginManager().getPlugin("ProtocolLib").getDescription().getVersion();
} }
}); });
} catch (Exception e) { } catch (Exception e) {
+1 -1
View File
@@ -2,7 +2,7 @@ name: AntiCheatReloaded
author: Rammelkast author: Rammelkast
description: AntiCheatReloaded helps easily identify and block malicious users on your server. description: AntiCheatReloaded helps easily identify and block malicious users on your server.
main: com.rammelkast.anticheatreloaded.AntiCheat main: com.rammelkast.anticheatreloaded.AntiCheat
softdepend: [ProtocolLib] depend: [ProtocolLib]
startup: postworld startup: postworld
version: ${project.build.version} version: ${project.build.version}
commands: commands: