diff options
author | Chris Ward <chris@chrisgward.com> | 2012-12-20 23:07:49 +1100 |
---|---|---|
committer | Chris Ward <chris@chrisgward.com> | 2012-12-20 23:07:49 +1100 |
commit | b28db7e435483c201071f7bc477eceb678315f80 (patch) | |
tree | f736710c59ae76804cb6bab14b3604ba3d6fc04a | |
parent | 9097bef7281403ab597dd9b5d5c191537fca7d1e (diff) | |
download | Essentials-b28db7e435483c201071f7bc477eceb678315f80.tar Essentials-b28db7e435483c201071f7bc477eceb678315f80.tar.gz Essentials-b28db7e435483c201071f7bc477eceb678315f80.tar.lz Essentials-b28db7e435483c201071f7bc477eceb678315f80.tar.xz Essentials-b28db7e435483c201071f7bc477eceb678315f80.zip |
Fix currency display in MOTD - display currency character, trim decimal places
-rw-r--r-- | Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java | 4 |
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()); |