From 7f7d53e00aad05d63e0887003532391589692f81 Mon Sep 17 00:00:00 2001 From: CocoTheOwner Date: Fri, 10 Sep 2021 01:08:30 +0200 Subject: [PATCH] Add download to studio --- .../volmit/iris/core/commands/CommandStudio.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/volmit/iris/core/commands/CommandStudio.java b/src/main/java/com/volmit/iris/core/commands/CommandStudio.java index e6682f17b..65f53b18e 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandStudio.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandStudio.java @@ -105,6 +105,20 @@ public class CommandStudio implements DecreeExecutor { 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) public void open( @Param(defaultValue = "overworld", description = "The dimension to open a studio for", aliases = "dim")