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:
parent
b2caa0f762
commit
aebd63ac13
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue