feat: /mods command lists all mods

badly tho: it doesn't fit on screen and must be read from minecraft logs
This commit is contained in:
əlemi 2023-11-13 05:02:17 +01:00
parent b2caa0f762
commit aebd63ac13
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -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;
});
}