By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2013-02-23 08:58:35 +11:00
parent 28c8009a16
commit 94ccdc0d40
2 changed files with 654 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ public class SpigotConfig
static int version;
static Map<String, Command> commands;
/*========================================================================*/
private static Metrics metrics;
public static void init(File configFile)
{
@@ -69,6 +70,18 @@ public class SpigotConfig
{
MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "Spigot", entry.getValue() );
}
if ( SpigotConfig.metrics == null )
{
try
{
SpigotConfig.metrics = new Metrics();
SpigotConfig.metrics.start();
} catch ( IOException ex )
{
Bukkit.getServer().getLogger().log( Level.SEVERE, "Could not start metrics service", ex );
}
}
}
static void readConfig(Class<?> clazz, Object instance)