From e2c77c0798c623ba8c12f530385ee1bba812ba74 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Thu, 17 Sep 2015 14:21:38 +0800 Subject: [PATCH] add Metrics... Signed-off-by: 502647092 --- .../java/cn/citycraft/SimpleProtect/SimpleProtect.java | 9 ++++++++- .../SimpleProtect/command/SimpleProtectCommand.java | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/citycraft/SimpleProtect/SimpleProtect.java b/src/main/java/cn/citycraft/SimpleProtect/SimpleProtect.java index 8c6f8c8..914cbb1 100644 --- a/src/main/java/cn/citycraft/SimpleProtect/SimpleProtect.java +++ b/src/main/java/cn/citycraft/SimpleProtect/SimpleProtect.java @@ -1,8 +1,11 @@ package cn.citycraft.SimpleProtect; +import java.io.IOException; + import org.bukkit.Bukkit; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; +import org.mcstats.Metrics; import cn.citycraft.PluginHelper.config.FileConfig; import cn.citycraft.PluginHelper.utils.VersionChecker; @@ -71,7 +74,11 @@ public class SimpleProtect extends JavaPlugin { getCommand("simpleprotect").setExecutor(new SimpleProtectCommand(this)); getServer().getConsoleSender().sendMessage("==========" + servername + pluginname + "=========="); new VersionChecker(this); - + try { + Metrics metrics = new Metrics(this); + metrics.start(); + } catch (IOException e) { + } } @Override diff --git a/src/main/java/cn/citycraft/SimpleProtect/command/SimpleProtectCommand.java b/src/main/java/cn/citycraft/SimpleProtect/command/SimpleProtectCommand.java index f0cebfc..8916b67 100644 --- a/src/main/java/cn/citycraft/SimpleProtect/command/SimpleProtectCommand.java +++ b/src/main/java/cn/citycraft/SimpleProtect/command/SimpleProtectCommand.java @@ -53,7 +53,6 @@ public class SimpleProtectCommand implements CommandExecutor { return true; } break; - case 2: Player p = Bukkit.getPlayer(args[1]); switch (args[0]) {