mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
Detect the studio editor by default
This commit is contained in:
1 parent
98cd73bc8f
commit
72852b1300
8 files changed
+79
-22
No files matched your search
@@ -53,7 +53,7 @@ public class CommandEdit implements DirectorExecutor {
|
||||
}
|
||||
|
||||
private boolean editorUnavailable() {
|
||||
StudioEditor editor = StudioEditorLauncher.configuredEditor();
|
||||
StudioEditor editor = StudioEditorLauncher.resolvedEditor();
|
||||
if (editor == StudioEditor.NONE) {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_EDIT_NO_EDITOR_CONFIGURED));
|
||||
return true;
|
||||
@@ -67,7 +67,7 @@ public class CommandEdit implements DirectorExecutor {
|
||||
}
|
||||
|
||||
private void openInEditor(IrisRegistrant registrant) {
|
||||
MessageArgument editorName = MessageArgument.untrusted("editor", StudioEditorLauncher.configuredEditor().getDisplayName());
|
||||
MessageArgument editorName = MessageArgument.untrusted("editor", StudioEditorLauncher.resolvedEditor().getDisplayName());
|
||||
if (!StudioEditorLauncher.openFile(registrant.getLoader().getDataFolder(), registrant.getLoadFile())) {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_EDIT_COULD_NOT_OPEN_EDITOR, editorName));
|
||||
return;
|
||||
|
||||
@@ -181,7 +181,7 @@ public class CommandStudio implements DirectorExecutor {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_COULD_NOT_RESOLVE_PACK_DIMENSION, MessageArgument.untrusted("value", pack)));
|
||||
return;
|
||||
}
|
||||
StudioEditor editor = StudioEditorLauncher.configuredEditor();
|
||||
StudioEditor editor = StudioEditorLauncher.resolvedEditor();
|
||||
if (editor == StudioEditor.NONE) {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_EDIT_NO_EDITOR_CONFIGURED));
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user