Added Plugin Metrics.

This commit is contained in:
Tobias Ottenweller 2013-07-16 12:09:20 +02:00
parent e60c735153
commit d5ff63c163
2 changed files with 31 additions and 0 deletions

20
pom.xml
View File

@ -57,6 +57,7 @@
</build>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
@ -64,6 +65,7 @@
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
@ -71,6 +73,7 @@
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
@ -78,16 +81,33 @@
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mcstats.bukkit</groupId>
<artifactId>metrics</artifactId>
<version>R6</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
</repository>
<repository>
<id>Plugin Metrics</id>
<url>http://repo.mcstats.org/content/repositories/public</url>
</repository>
</repositories>
</project>

View File

@ -16,6 +16,7 @@
*/
package de.craftinc.gates;
import java.io.IOException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -33,6 +34,7 @@ import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import de.craftinc.gates.commands.*;
import org.mcstats.Metrics;
public class Plugin extends JavaPlugin
@ -123,6 +125,15 @@ public class Plugin extends JavaPlugin
@Override
public void onEnable()
{
// Setup Metrics
try {
Metrics metrics = new Metrics(this);
metrics.start();
}
catch (IOException e) {
log("Failed to start metrics!");
}
// Setup configuration
this.saveDefaultConfig();