mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-02-16 02:20:44 +00:00
add check for headless environments to the edit command
This commit is contained in:
@@ -46,6 +46,16 @@ public class CommandEdit implements DecreeExecutor {
|
|||||||
sender().sendMessage(C.RED + "You must be in a studio world!");
|
sender().sendMessage(C.RED + "You must be in a studio world!");
|
||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user