From cd199302c273ea9103faa5eae3a6a03fe145d83e Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 9 May 2011 09:31:36 +0000 Subject: [PATCH] Log items that are sold using /sell git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1392 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../src/com/earth2me/essentials/commands/Commandsell.java | 4 ++++ .../com/earth2me/essentials/commands/EssentialsCommand.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java index 9469dd480..3ba7f22f7 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java @@ -6,6 +6,8 @@ import com.earth2me.essentials.InventoryWorkaround; import com.earth2me.essentials.ItemDb; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; +import com.sun.tools.javac.util.Log; +import java.util.logging.Level; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; @@ -136,5 +138,7 @@ public class Commandsell extends EssentialsCommand user.updateInventory(); user.giveMoney(worth * amount); user.sendMessage("§7Sold for §c" + Util.formatCurrency(worth * amount) + "§7 (" + amount + " items at " + Util.formatCurrency(worth) + " each)"); + logger.log(Level.INFO, user.getDisplayName() + " sold "+is.getType().toString().toLowerCase() + " for §c" + Util.formatCurrency(worth * amount) + "§7 (" + amount + " items at " + Util.formatCurrency(worth) + " each)"); + } } diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java index 759e4f2a5..f7110ac7f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java @@ -7,12 +7,14 @@ import org.bukkit.command.CommandSender; import com.earth2me.essentials.Essentials; import org.bukkit.entity.Player; import com.earth2me.essentials.User; +import java.util.logging.Logger; public abstract class EssentialsCommand implements IEssentialsCommand { private final String name; protected Essentials ess; + protected final static Logger logger = Logger.getLogger("Minecraft"); protected EssentialsCommand(String name) {