mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 03:28:30 +01:00
Fix currency display in MOTD - display currency character, trim decimal places
This commit is contained in:
parent
9097bef728
commit
b28db7e435
@ -3,7 +3,9 @@ package com.earth2me.essentials.textreader;
|
|||||||
import com.earth2me.essentials.DescParseTickFormat;
|
import com.earth2me.essentials.DescParseTickFormat;
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
|
import com.earth2me.essentials.Util;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -42,7 +44,7 @@ public class KeywordReplacer implements IText
|
|||||||
userName = user.getName();
|
userName = user.getName();
|
||||||
ipAddress = user.getAddress() == null || user.getAddress().getAddress() == null ? "" : user.getAddress().getAddress().toString();
|
ipAddress = user.getAddress() == null || user.getAddress().getAddress() == null ? "" : user.getAddress().getAddress().toString();
|
||||||
address = user.getAddress() == null ? "" : user.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());
|
mails = Integer.toString(user.getMails().size());
|
||||||
world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName();
|
world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName();
|
||||||
worldTime12 = DescParseTickFormat.format12(user.getWorld() == null ? 0 : user.getWorld().getTime());
|
worldTime12 = DescParseTickFormat.format12(user.getWorld() == null ? 0 : user.getWorld().getTime());
|
||||||
|
Loading…
Reference in New Issue
Block a user