Allow consoles to open the vision gui

This commit is contained in:
CocoTheOwner 2021-11-18 15:09:41 +01:00
parent c1a6ca80f5
commit d343cd4f08

View File

@ -419,12 +419,18 @@ public class CommandStudio implements DecreeExecutor {
}
@Decree(description = "Render a world map (External GUI)", aliases = "render")
public void map() {
if (noStudio()) return;
public void map(
@Param(name = "world", description = "The world to open the generator for", contextual = true)
World world
) {
if (noGUI()) return;
VisionGUI.launch(engine(), 0);
if (!IrisToolbelt.isIrisWorld(world)) {
sender().sendMessage(C.RED + "You need to be in or specify an Iris-generated world!");
return;
}
VisionGUI.launch(IrisToolbelt.access(world).getEngine(), 0);
sender().sendMessage(C.GREEN + "Opening map!");
}