mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 04:29:05 +00:00
Fixes
This commit is contained in:
@@ -82,11 +82,19 @@ public class CommandIrisCreate extends MortarCommand
|
||||
else
|
||||
{
|
||||
sender.sendMessage("Foind " + type + " dimension in packs folder. Repackaging");
|
||||
ZipUtil.unpack(Iris.proj.compilePackage(sender, type, true), iris);
|
||||
ZipUtil.unpack(Iris.proj.compilePackage(sender, type, true, true), iris);
|
||||
}
|
||||
|
||||
File dimf = new File(iris, "dimensions/" + type + ".json");
|
||||
|
||||
if(!dimf.exists() || !dimf.isFile())
|
||||
{
|
||||
Iris.globaldata.dump();
|
||||
Iris.globaldata.preferFolder(null);
|
||||
Iris.proj.downloadSearch(sender, type, false);
|
||||
ZipUtil.unpack(Iris.proj.compilePackage(sender, type, true, true), iris);
|
||||
}
|
||||
|
||||
if(!dimf.exists() || !dimf.isFile())
|
||||
{
|
||||
sender.sendMessage("Can't find the " + dimf.getName() + " in the dimensions folder of this pack! Failed!");
|
||||
|
||||
@@ -15,6 +15,9 @@ public class CommandIrisStudio extends MortarCommand
|
||||
|
||||
@Command
|
||||
private CommandIrisStudioClose close;
|
||||
|
||||
@Command
|
||||
private CommandIrisStudioDownload download;
|
||||
|
||||
@Command
|
||||
private CommandIrisStudioPackage pkg;
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.volmit.iris.command;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
|
||||
public class CommandIrisStudioDownload extends MortarCommand
|
||||
{
|
||||
public CommandIrisStudioDownload()
|
||||
{
|
||||
super("download", "down", "dl");
|
||||
requiresPermission(Iris.perm.studio);
|
||||
setDescription("Download a project.");
|
||||
setCategory("Studio");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
if(args.length < 1)
|
||||
{
|
||||
sender.sendMessage("/iris std dl " + C.BOLD + "<NAME>");
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean trim = false;
|
||||
|
||||
for(String i : args)
|
||||
{
|
||||
if(i.equals("-t") || i.equals("--trim"))
|
||||
{
|
||||
trim = true;
|
||||
}
|
||||
}
|
||||
|
||||
boolean btrim = trim;
|
||||
|
||||
J.a(() -> Iris.proj.downloadSearch(sender, args[0], btrim));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getArgsUsage()
|
||||
{
|
||||
return "<name> [-t/--trim]";
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ public class CommandIrisStudioPackage extends MortarCommand
|
||||
J.a(() ->
|
||||
{
|
||||
boolean o = false;
|
||||
boolean m = true;
|
||||
|
||||
for(String i : args)
|
||||
{
|
||||
@@ -37,7 +38,7 @@ public class CommandIrisStudioPackage extends MortarCommand
|
||||
}
|
||||
|
||||
String dim = args[0];
|
||||
Iris.proj.compilePackage(sender, dim, o);
|
||||
Iris.proj.compilePackage(sender, dim, o, m);
|
||||
});
|
||||
|
||||
return true;
|
||||
@@ -46,6 +47,6 @@ public class CommandIrisStudioPackage extends MortarCommand
|
||||
@Override
|
||||
protected String getArgsUsage()
|
||||
{
|
||||
return "[dimension] [-o]";
|
||||
return "[dimension] [-o] [-m]";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user