From db370418f8d0648a3202c05b0641b4cf53aa8651 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 30 Dec 2012 00:02:39 +0100 Subject: [PATCH] Add version number to /mcmmo command Also used the logger in onEnable and onDisable --- .../java/com/gmail/nossr50/commands/mc/McmmoCommand.java | 1 + src/main/java/com/gmail/nossr50/mcMMO.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java b/src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java index af60670fc..90f07bb7b 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/mc/McmmoCommand.java @@ -28,6 +28,7 @@ public class McmmoCommand implements CommandExecutor { sender.sendMessage(ChatColor.DARK_AQUA + "Donation Info:"); sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "mcmmodev@gmail.com" + ChatColor.GOLD + " Paypal"); } + sender.sendMessage(ChatColor.YELLOW + "Running version: " + ChatColor.DARK_AQUA + mcMMO.p.getDescription().getVersion()); return true; } diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 7b1bdf892..a0b973e54 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -148,7 +148,7 @@ public class mcMMO extends JavaPlugin { //Check if Repair Anvil and Salvage Anvil have different itemID's if (configInstance.getSalvageAnvilId() == configInstance.getRepairAnvilId()){ - System.out.println("[WARNING!] Can't use the same itemID for Repair/Salvage Anvils!" ); + getLogger().warning("Can't use the same itemID for Repair/Salvage Anvils!"); } if (!configInstance.getUseMySQL()) { @@ -182,7 +182,7 @@ public class mcMMO extends JavaPlugin { Users.addUser(player); //In case of reload add all users back into PlayerProfile } - System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" ); + getLogger().info("Version " + pdfFile.getVersion() + " is enabled!"); BukkitScheduler scheduler = getServer().getScheduler(); @@ -301,7 +301,7 @@ public class mcMMO extends JavaPlugin { getLogger().severe(e.toString()); } - System.out.println("mcMMO was disabled."); //How informative! + getLogger().info("Was disabled."); //How informative! } /**