diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-08-09 18:55:22 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-08-09 18:55:22 -0400 |
commit | a0866865a3c51adf96799f93f59a6d49b834efde (patch) | |
tree | ffa6f7f4b91f179c679844c2869905cdfb3ef311 /src/main/java/me/Danker/commands/SlayerCommand.java | |
parent | 166f6e05d2821d0fea1a14321a7a2b12e0f86bbb (diff) | |
download | SkyblockMod-a0866865a3c51adf96799f93f59a6d49b834efde.tar.gz SkyblockMod-a0866865a3c51adf96799f93f59a6d49b834efde.tar.bz2 SkyblockMod-a0866865a3c51adf96799f93f59a6d49b834efde.zip |
Fix number format of /bank and /slayer
Diffstat (limited to 'src/main/java/me/Danker/commands/SlayerCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/SlayerCommand.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java index f8100b4..0aba569 100644 --- a/src/main/java/me/Danker/commands/SlayerCommand.java +++ b/src/main/java/me/Danker/commands/SlayerCommand.java @@ -2,6 +2,7 @@ package me.Danker.commands; import java.text.NumberFormat; import java.util.List; +import java.util.Locale; import com.google.gson.JsonObject; @@ -99,11 +100,12 @@ public class SlayerCommand extends CommandBase { wolfXP = slayersObject.get("wolf").getAsJsonObject().get("xp").getAsInt(); } + NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + NumberFormat.getIntegerInstance().format(zombieXP + spiderXP + wolfXP) + "\n" + - EnumChatFormatting.AQUA + " Zombie XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + NumberFormat.getIntegerInstance().format(zombieXP) + "\n" + - EnumChatFormatting.AQUA + " Spider XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + NumberFormat.getIntegerInstance().format(spiderXP) + "\n" + - EnumChatFormatting.AQUA + " Wolf XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + NumberFormat.getIntegerInstance().format(wolfXP) + "\n" + + EnumChatFormatting.AQUA + " " + username + "'s Total XP: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + nf.format(zombieXP + spiderXP + wolfXP) + "\n" + + EnumChatFormatting.AQUA + " Zombie XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + nf.format(zombieXP) + "\n" + + EnumChatFormatting.AQUA + " Spider XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + nf.format(spiderXP) + "\n" + + EnumChatFormatting.AQUA + " Wolf XP: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + nf.format(wolfXP) + "\n" + EnumChatFormatting.AQUA + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); |