aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-04-05 03:19:04 -0400
committerbowser0000 <bowser0000@gmail.com>2022-04-05 03:19:04 -0400
commit6c8469687c9dcad10e5291e1ac581ebafba91f26 (patch)
tree82a6cb9e18e8ade3c8c001ed908e27f0c695741c /src/main/java/me/Danker/commands
parentd80e4d76971b99daeccde6b45876ea68ebcb6458 (diff)
downloadSkyblockMod-6c8469687c9dcad10e5291e1ac581ebafba91f26.tar.gz
SkyblockMod-6c8469687c9dcad10e5291e1ac581ebafba91f26.tar.bz2
SkyblockMod-6c8469687c9dcad10e5291e1ac581ebafba91f26.zip
Fix estimated time in lobby commands
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r--src/main/java/me/Danker/commands/LobbyBankCommand.java3
-rw-r--r--src/main/java/me/Danker/commands/LobbySkillsCommand.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/commands/LobbyBankCommand.java b/src/main/java/me/Danker/commands/LobbyBankCommand.java
index 5b9795b..fc63d89 100644
--- a/src/main/java/me/Danker/commands/LobbyBankCommand.java
+++ b/src/main/java/me/Danker/commands/LobbyBankCommand.java
@@ -5,6 +5,7 @@ import com.google.gson.JsonObject;
import me.Danker.DankersSkyblockMod;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
+import me.Danker.utils.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.network.NetworkPlayerInfo;
import net.minecraft.command.CommandBase;
@@ -55,7 +56,7 @@ public class LobbyBankCommand extends CommandBase {
try {
// Create deep copy of players to prevent passing reference and ConcurrentModificationException
Collection<NetworkPlayerInfo> players = new ArrayList<>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap());
- playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking bank of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds."));
+ playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking bank of lobby. Estimated time: " + (int) (Utils.getMatchingPlayers("").size() * 1.2 + 1) + " seconds."));
// Send request every .6 seconds, leaving room for another 20 requests per minute
for (final NetworkPlayerInfo player : players) {
diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java
index dd5c249..f9f1271 100644
--- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java
+++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java
@@ -58,7 +58,7 @@ public class LobbySkillsCommand extends CommandBase {
try {
// Create deep copy of players to prevent passing reference and ConcurrentModificationException
Collection<NetworkPlayerInfo> players = new ArrayList<>(Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap());
- playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (players.size() * 1.2 + 1) + " seconds."));
+ playerSP.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking skill average of lobby. Estimated time: " + (int) (Utils.getMatchingPlayers("").size() * 1.2 + 1) + " seconds."));
// Send request every .6 seconds, leaving room for another 20 requests per minute
for (final NetworkPlayerInfo player : players) {