Add download to studio

This commit is contained in:
CocoTheOwner 2021-09-10 01:08:30 +02:00
parent c3b1d6735e
commit 7f7d53e00a

View File

@ -105,6 +105,20 @@ public class CommandStudio implements DecreeExecutor {
return duration.toString().substring(2).replaceAll("(\\d[HMS])(?!$)", "$1 ").toLowerCase(); return duration.toString().substring(2).replaceAll("(\\d[HMS])(?!$)", "$1 ").toLowerCase();
} }
@Decree(description = "Download a project.", aliases = "dl")
public void download(
@Param(name = "pack", description = "The pack to download", defaultValue = "overworld", aliases = "project")
String pack,
@Param(name = "branch", description = "The branch to download from", defaultValue = "master")
String branch,
@Param(name = "trim", description = "Whether or not to download a trimmed version (do not enable when editing)", defaultValue = "false")
boolean trim,
@Param(name = "overwrite", description = "Whether or not to overwrite the pack with the downloaded one", aliases = "force", defaultValue = "false")
boolean overwrite
) {
new CommandIris().download(pack, branch, trim, overwrite);
}
@Decree(description = "Open a new studio world", aliases = "o", sync = true) @Decree(description = "Open a new studio world", aliases = "o", sync = true)
public void open( public void open(
@Param(defaultValue = "overworld", description = "The dimension to open a studio for", aliases = "dim") @Param(defaultValue = "overworld", description = "The dimension to open a studio for", aliases = "dim")