diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-11-09 14:50:39 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-11-09 14:50:39 -0500 |
commit | 511b95de7dcb83e047dce2adadeff8c18804c1b6 (patch) | |
tree | 9e83ee2e91842b6c19a5bb05c0a9d7acac89e3ae /src/main/java/me/Danker/commands/LobbySkillsCommand.java | |
parent | 432ee590f73a08b184f0d0ec65b8549aa2f3e877 (diff) | |
download | SkyblockMod-511b95de7dcb83e047dce2adadeff8c18804c1b6.tar.gz SkyblockMod-511b95de7dcb83e047dce2adadeff8c18804c1b6.tar.bz2 SkyblockMod-511b95de7dcb83e047dce2adadeff8c18804c1b6.zip |
Add config values for colours and many bug fixes
Fix spooky fishing config values
Add spooky fishing to /importfishing
Add boolean to config to truely turn off chat Maddox
Remove bold red name from three man puzzle answer
Change spooky fishing to fishing spooky
Diffstat (limited to 'src/main/java/me/Danker/commands/LobbySkillsCommand.java')
-rw-r--r-- | src/main/java/me/Danker/commands/LobbySkillsCommand.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java index dc89b63..696a855 100644 --- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java +++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java @@ -11,6 +11,7 @@ import java.util.stream.Collectors; import com.google.gson.JsonArray; import com.google.gson.JsonObject; +import me.Danker.TheMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -53,7 +54,7 @@ public class LobbySkillsCommand extends CommandBase { // Check key String key = cf.getString("api", "APIKey"); if (key.equals("")) { - playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Use /setkey.")); + playerSP.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "API key not set. Use /setkey.")); return; } @@ -61,7 +62,7 @@ public class LobbySkillsCommand extends CommandBase { try { // Create deep copy of players to prevent passing reference and ConcurrentModificationException Collection<NetworkPlayerInfo> players = new ArrayList<NetworkPlayerInfo>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap()); - playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds.")); + playerSP.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds.")); // Send request every .6 seconds, leaving room for another 20 requests per minute for (final NetworkPlayerInfo player : players) { @@ -187,7 +188,7 @@ public class LobbySkillsCommand extends CommandBase { String[] sortedSAListKeys = sortedSAList.keySet().toArray(new String[sortedSAList.keySet().size()]); String top3 = ""; for (int i = 0; i < 3 && i < sortedSAListKeys.length; i++) { - top3 += "\n " + EnumChatFormatting.AQUA + sortedSAListKeys[i] + ": " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + sortedSAList.get(sortedSAListKeys[i]); + top3 += "\n " + EnumChatFormatting.AQUA + sortedSAListKeys[i] + ": " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + sortedSAList.get(sortedSAListKeys[i]); } // Get lobby sa @@ -198,10 +199,10 @@ public class LobbySkillsCommand extends CommandBase { lobbySA = (double) Math.round((lobbySA / lobbySkills.size()) * 100) / 100; // Finally say skill lobby avg and highest SA users - playerSP.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.GREEN + " Lobby Skill Average: " + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + lobbySA + "\n" + - EnumChatFormatting.GREEN + " Highest Skill Averages:" + top3 + "\n" + - EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + " -------------------")); + playerSP.addChatMessage(new ChatComponentText(TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + TheMod.TYPE_COLOUR + " Lobby Skill Average: " + TheMod.SKILL_AVERAGE_COLOUR + EnumChatFormatting.BOLD + lobbySA + "\n" + + TheMod.TYPE_COLOUR + " Highest Skill Averages:" + top3 + "\n" + + TheMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + " -------------------")); } catch (InterruptedException ex) { System.out.println("Current skill average list: " + unsortedSAList.toString()); Thread.currentThread().interrupt(); |