diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..85064c5c --- /dev/null +++ b/circle.yml @@ -0,0 +1,9 @@ +machine: + java: + version: oraclejdk7 +general: + artifacts: + - "target/*.jar" +test: + override: + - mvn clean install diff --git a/pom.xml b/pom.xml index c6f2877a..5db7114c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - fr.xephi.authme - AuthMe + fr.xephi + authme 5.0-SNAPSHOT AuthMeReloaded @@ -22,8 +22,6 @@ 1.8.7-R0.1-SNAPSHOT - - ${project.groupId}.${project.artifactId} @@ -90,8 +88,15 @@ com.sun.mail:* javax.mail:* com.comphenix.attribute:* + org.mcstats.*:* + + + org.mcstats + fr.xephi.authme + + @@ -113,6 +118,12 @@ https://hub.spigotmc.org/nexus/content/groups/public/ + + + Plugin Metrics + http://repo.mcstats.org/content/repositories/public + + vault-repo @@ -202,6 +213,23 @@ 1.2.14 + + org.mcstats.bukkit + metrics-lite + R7 + compile + + + org.bukkit + bukkit + + + org.bukkit + craftbukkit + + + + diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index b513ba98..8e433b17 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -3,6 +3,7 @@ package fr.xephi.authme; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; @@ -27,6 +28,7 @@ import org.bukkit.entity.Player; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.java.JavaPlugin; +import org.mcstats.MetricsLite; import com.earth2me.essentials.Essentials; import com.maxmind.geoip.LookupService; @@ -126,7 +128,16 @@ public class AuthMe extends JavaPlugin { this.getServer().shutdown(); return; } - + + try { + MetricsLite metrics = new MetricsLite(this); + metrics.start(); + ConsoleLogger.info("Metrics-Lite started successfully!"); + } catch (IOException e) { + // Failed to submit the stats :-( + ConsoleLogger.showError("Can't start Metrics-Lite! The plugin will work anyway..."); + } + citizens = new CitizensCommunicator(this); if (Settings.enableAntiBot) {