summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-09 09:31:36 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-09 09:31:36 +0000
commit153bcd9fa0950a854aa3f88a7825944058505b01 (patch)
tree07a2547f84a4489454add1cdfad205977df0b349
parentcf6ac87a29e34fafbb2951b2ba1c6743b02a7cf3 (diff)
downloadEssentials-153bcd9fa0950a854aa3f88a7825944058505b01.tar
Essentials-153bcd9fa0950a854aa3f88a7825944058505b01.tar.gz
Essentials-153bcd9fa0950a854aa3f88a7825944058505b01.tar.lz
Essentials-153bcd9fa0950a854aa3f88a7825944058505b01.tar.xz
Essentials-153bcd9fa0950a854aa3f88a7825944058505b01.zip
Log items that are sold using /sell
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1392 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsell.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java2
2 files changed, 6 insertions, 0 deletions
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)
{