diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-03-18 20:04:03 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-03-18 20:04:03 -0400 |
commit | f4aa6f6e5383da9e2b08f94aa131bf960e8fa471 (patch) | |
tree | 144153b09e9281ef4e0fb224989a861b978aaf95 /src/main/java/me/Danker/commands | |
parent | d500946a0df2da0385f2ec25511f16c6b94fd662 (diff) | |
download | SkyblockMod-f4aa6f6e5383da9e2b08f94aa131bf960e8fa471.tar.gz SkyblockMod-f4aa6f6e5383da9e2b08f94aa131bf960e8fa471.tar.bz2 SkyblockMod-f4aa6f6e5383da9e2b08f94aa131bf960e8fa471.zip |
Add commans to /lobbybank and fix overlapping buttons
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r-- | src/main/java/me/Danker/commands/LobbyBankCommand.java | 6 |
1 files changed, 4 insertions, 2 deletions
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 + " -------------------")); |