aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
author alemi <me@alemi.dev>2023-11-13 05:02:17 +0100
committer alemi <me@alemi.dev>2023-11-13 05:02:17 +0100
commitaebd63ac13f2e613a6d5a13ee9aff8740bf43c9e (patch)
tree2f4e8b17b904ea469f770c93485b71978f51e1ac /src/main/java
parentb2caa0f7620603766e72ead83730e78bfad2ad97 (diff)
feat: /mods command lists all mods
badly tho: it doesn't fit on screen and must be read from minecraft logs
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/ftbsc/bscv/commands/ModCommands.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/ftbsc/bscv/commands/ModCommands.java b/src/main/java/ftbsc/bscv/commands/ModCommands.java
index 82e8661..57e1887 100644
--- a/src/main/java/ftbsc/bscv/commands/ModCommands.java
+++ b/src/main/java/ftbsc/bscv/commands/ModCommands.java
@@ -9,7 +9,7 @@ import ftbsc.bscv.api.IModule;
import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
-import static ftbsc.bscv.Boscovicino.log;
+import java.util.stream.Collectors;
@AutoService(ILoadable.class)
public class ModCommands extends AbstractCommand {
@@ -43,8 +43,11 @@ public class ModCommands extends AbstractCommand {
})
)
.executes(ctx -> {
- log("no args specified");
- return 0;
+ String mods = Boscovicino.modManager.mods.stream()
+ .map(x -> x.getName())
+ .collect(Collectors.joining(","));
+ Boscovicino.log("[ %s ]", mods);
+ return 1;
});
}