9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-31 12:56:35 +00:00

add check for headless environments to the edit command

This commit is contained in:
Julian Krings
2025-12-31 13:01:18 +01:00
parent 9999f3e429
commit cfbf68d37a

View File

@@ -46,6 +46,16 @@ public class CommandEdit implements DecreeExecutor {
sender().sendMessage(C.RED + "You must be in a studio world!");
return true;
}
if (GraphicsEnvironment.isHeadless()) {
sender().sendMessage(C.RED + "Cannot open files in headless environments!");
return true;
}
if (!Desktop.isDesktopSupported()) {
sender().sendMessage(C.RED + "Desktop is not supported by this environment!");
return true;
}
return false;
}