mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Added Hidendra's Plugin Metrics to mcMMO.
This commit is contained in:
parent
70756c2a2e
commit
71c14ab07b
2
pom.xml
2
pom.xml
@ -2,7 +2,6 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>1.2.11</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/TheYeti/mcMMO</url>
|
||||
<issueManagement>
|
||||
@ -122,4 +121,5 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<version>1.1.12-dev</version>
|
||||
</project>
|
||||
|
@ -51,6 +51,7 @@ import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
@ -93,6 +94,7 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
public void onEnable()
|
||||
{
|
||||
final Plugin thisPlugin = this;
|
||||
mcmmo = this.getFile();
|
||||
new File(maindirectory).mkdir();
|
||||
|
||||
@ -167,6 +169,21 @@ public class mcMMO extends JavaPlugin
|
||||
FileManager FM = SpoutManager.getFileManager();
|
||||
FM.addToPreLoginCache(this, SpoutStuff.getFiles());
|
||||
}
|
||||
|
||||
//Plugin Metrics running in a new thread
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
// create a new metrics object
|
||||
Metrics metrics = new Metrics();
|
||||
|
||||
// 'this' in this context is the Plugin object
|
||||
metrics.beginMeasuringPlugin(thisPlugin);
|
||||
} catch (IOException e) {
|
||||
// Failed to submit the stats :-(
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
public PlayerProfile getPlayerProfile(Player player)
|
||||
|
Loading…
Reference in New Issue
Block a user