summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/ISettings.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/Trade.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java3
4 files changed, 12 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java
index cded5bde5..6186736b4 100644
--- a/Essentials/src/com/earth2me/essentials/ISettings.java
+++ b/Essentials/src/com/earth2me/essentials/ISettings.java
@@ -119,6 +119,8 @@ public interface ISettings extends IConf
double getMinMoney();
boolean isEcoLogEnabled();
+
+ boolean isEcoLogUpdateEnabled();
boolean removeGodOnDisconnect();
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index b6b1f4994..732b5485c 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -559,6 +559,12 @@ public class Settings implements ISettings
{
return config.getBoolean("economy-log-enabled", false);
}
+
+ @Override
+ public boolean isEcoLogUpdateEnabled()
+ {
+ return config.getBoolean("economy-log-update-enabled", false);
+ }
@Override
public boolean removeGodOnDisconnect()
diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java
index 5ed80d35b..3594c3137 100644
--- a/Essentials/src/com/earth2me/essentials/Trade.java
+++ b/Essentials/src/com/earth2me/essentials/Trade.java
@@ -198,7 +198,8 @@ public class Trade
public static void log(String type, String subtype, String event, String sender, Trade charge, String receiver, Trade pay, Location loc, IEssentials ess)
{
- if (!ess.getSettings().isEcoLogEnabled())
+ if ((loc == null && !ess.getSettings().isEcoLogUpdateEnabled())
+ || (loc != null && !ess.getSettings().isEcoLogEnabled()))
{
return;
}
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index 0be375c88..ba34548fe 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -385,8 +385,9 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
catch (Throwable ex)
{
}
- }
+ }
super.setMoney(value);
+ Trade.log("Update", "Set", "API", getName(), new Trade(value, ess), null, null, null, ess);
}
public void updateMoneyCache(final double value)