mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-21 19:55:00 +00:00
60 lines
1.1 KiB
Java
60 lines
1.1 KiB
Java
package com.volmit.iris.command;
|
|
|
|
import com.volmit.iris.Iris;
|
|
import com.volmit.iris.IrisSettings;
|
|
import com.volmit.iris.util.J;
|
|
import com.volmit.iris.util.MortarCommand;
|
|
import com.volmit.iris.util.MortarSender;
|
|
|
|
public class CommandIrisStudioPackage extends MortarCommand
|
|
{
|
|
public CommandIrisStudioPackage()
|
|
{
|
|
super("package", "pkg");
|
|
requiresPermission(Iris.perm.studio);
|
|
setDescription("Package your dimension into a compressed format.");
|
|
setCategory("Studio");
|
|
}
|
|
|
|
@Override
|
|
public boolean handle(MortarSender sender, String[] args)
|
|
{
|
|
if(!IrisSettings.get().isStudio())
|
|
{
|
|
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
|
return true;
|
|
}
|
|
|
|
if(args.length == 0)
|
|
{
|
|
sender.sendMessage("/iris std package <DIMENSION> [-o] [-m]");
|
|
return true;
|
|
}
|
|
|
|
J.a(() ->
|
|
{
|
|
boolean o = false;
|
|
boolean m = true;
|
|
|
|
for(String i : args)
|
|
{
|
|
if(i.equalsIgnoreCase("-o"))
|
|
{
|
|
o = true;
|
|
}
|
|
}
|
|
|
|
String dim = args[0];
|
|
Iris.proj.compilePackage(sender, dim, o, m);
|
|
});
|
|
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
protected String getArgsUsage()
|
|
{
|
|
return "[dimension] [-o] [-m]";
|
|
}
|
|
}
|