summaryrefslogtreecommitdiff
path: root/src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2025-10-15 04:01:15 +0100
committerdavidovski <david@davidovski.xyz>2025-10-15 04:01:15 +0100
commitdc825ad776f9fe9f763267874f6fa70c4870fc46 (patch)
treed8d2bcf26b180f2c1abbab4e0dc1929dd88e05ab /src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java
parent10b327e9f6441a8863227ce3e075a5a587654065 (diff)
v5
Diffstat (limited to 'src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java')
-rw-r--r--src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java b/src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java
index c094d83..084856b 100644
--- a/src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java
+++ b/src/main/java/net/uomc/mineshaft/resources/commands/ValuesCommand.java
@@ -7,6 +7,7 @@ import java.util.List;
import com.mouldycheerio.dbot.CustomBot;
import com.mouldycheerio.dbot.commands.CommandDetails;
import com.mouldycheerio.dbot.commands.CommandFail;
+import com.mouldycheerio.dbot.util.PeelingUtils;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.uomc.mineshaft.resources.Resource;
@@ -21,8 +22,6 @@ public class ValuesCommand extends ResourceCommand {
@Override
public void execute(MessageReceivedEvent e, CustomBot b, String[] args) throws CommandFail {
- long total = getResourceManager().getPrimaryResource().total();
-
List<Resource> resources = new ArrayList<Resource>(getResourceManager().getResources());
Collections.sort(resources, (r1, r2) -> Long.compare(r2.getValue(),r1.getValue()));
@@ -33,13 +32,11 @@ public class ValuesCommand extends ResourceCommand {
if (v < 0) {
stringBuilder.append("**???**");
} else {
- stringBuilder.append("**" + getResourceManager().getPrimaryResource().prettyValue(v) + "**");
+ stringBuilder.append("**" +PeelingUtils.amountToString(v) + "**");
}
stringBuilder.append("\n");
});
b.sendMessage(e, "Estimated Market Values", stringBuilder.toString());
}
-
-
}