summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ward <chris@chrisgward.com>2012-12-20 23:07:49 +1100
committerKHobbits <rob@khobbits.co.uk>2012-12-20 15:45:32 +0000
commit01d1ae442e9b0a59e5f12c12ad9203cd246d4d93 (patch)
tree039acd28b1b24eb4e31e9b0fdc5af525a7f4eaa2
parentdc13f46ff140e3b3e2fc8e1648c793577571b7c0 (diff)
downloadEssentials-01d1ae442e9b0a59e5f12c12ad9203cd246d4d93.tar
Essentials-01d1ae442e9b0a59e5f12c12ad9203cd246d4d93.tar.gz
Essentials-01d1ae442e9b0a59e5f12c12ad9203cd246d4d93.tar.lz
Essentials-01d1ae442e9b0a59e5f12c12ad9203cd246d4d93.tar.xz
Essentials-01d1ae442e9b0a59e5f12c12ad9203cd246d4d93.zip
Fix currency display in MOTD - display currency character, trim decimal places
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
index 4c875098b..e338af366 100644
--- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
+++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
@@ -3,7 +3,9 @@ package com.earth2me.essentials.textreader;
import com.earth2me.essentials.DescParseTickFormat;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import java.text.DateFormat;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -42,7 +44,7 @@ public class KeywordReplacer implements IText
userName = user.getName();
ipAddress = user.getAddress() == null || user.getAddress().getAddress() == null ? "" : user.getAddress().getAddress().toString();
address = user.getAddress() == null ? "" : user.getAddress().toString();
- balance = Double.toString(user.getMoney());
+ balance = Util.displayCurrency(user.getMoney(), ess);
mails = Integer.toString(user.getMails().size());
world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName();
worldTime12 = DescParseTickFormat.format12(user.getWorld() == null ? 0 : user.getWorld().getTime());