From f4aa6f6e5383da9e2b08f94aa131bf960e8fa471 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 18 Mar 2021 20:04:03 -0400 Subject: Add commans to /lobbybank and fix overlapping buttons --- src/main/java/me/Danker/commands/LobbyBankCommand.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/Danker/commands') diff --git a/src/main/java/me/Danker/commands/LobbyBankCommand.java b/src/main/java/me/Danker/commands/LobbyBankCommand.java index 5c1a63b..35a2ba0 100644 --- a/src/main/java/me/Danker/commands/LobbyBankCommand.java +++ b/src/main/java/me/Danker/commands/LobbyBankCommand.java @@ -15,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.text.NumberFormat; import java.util.*; import java.util.stream.Collectors; @@ -110,8 +111,9 @@ public class LobbyBankCommand extends CommandBase { String[] sortedBankListKeys = sortedBankList.keySet().toArray(new String[0]); String top3 = ""; + NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); for (int i = 0; i < 3 && i < sortedBankListKeys.length; i++) { - top3 += "\n " + EnumChatFormatting.AQUA + sortedBankListKeys[i] + ": " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + Math.round(sortedBankList.get(sortedBankListKeys[i])); + top3 += "\n " + EnumChatFormatting.AQUA + sortedBankListKeys[i] + ": " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + nf.format(Math.round(sortedBankList.get(sortedBankListKeys[i]))); } // Get lobby sa @@ -123,7 +125,7 @@ public class LobbyBankCommand extends CommandBase { // Finally say skill lobby avg and highest SA users playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - DankersSkyblockMod.TYPE_COLOUR + " Lobby Bank Average: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + Math.round(lobbyBank) + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Lobby Bank Average: " + DankersSkyblockMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + nf.format(Math.round(lobbyBank)) + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Highest Bank Averages:" + top3 + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + " -------------------")); -- cgit