Merge pack overwrite with download (under param)

This commit is contained in:
CocoTheOwner 2021-08-16 20:44:42 +02:00
parent e7a529257a
commit a3d6776c02

View File

@ -94,10 +94,12 @@ public class DecIris implements DecreeExecutor
@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 you're going to edit)")
boolean trim
boolean trim,
@Param(name = "overwrite", description = "Whether or not to overwrite the pack with the downloaded one", aliases = "force", defaultValue = "false")
boolean overwrite
) {
sender().sendMessage(C.GREEN + "Downloading pack: " + pack + "/" + branch + (trim ? " trimmed" : ""));
Iris.proj.downloadSearch(sender(), "IrisDimensions/" + pack + "/" + branch, trim);
Iris.proj.downloadSearch(sender(), "IrisDimensions/" + pack + "/" + branch, trim, overwrite);
}
@Decree(description = "Get metrics for your world", aliases = "measure", origin = DecreeOrigin.PLAYER)
@ -109,4 +111,11 @@ public class DecIris implements DecreeExecutor
sender().sendMessage(C.GREEN + "Sending metrics...");
engine().printMetrics(sender());
}
@Decree(description = "Reload configuration file (this is also done automatically)")
public void reload() {
IrisSettings.invalidate();
IrisSettings.get();
sender().sendMessage(C.GREEN + "Hotloaded settings");
}
}