Package github.jaffe2718.mccs.jfx.unit
Class CmdExecutor
java.lang.Object
github.jaffe2718.mccs.jfx.unit.CmdExecutor
To execute the command in the code area
There are 5 run modes:
1. Single Line: execute the command in the line where the cursor is located
2. Script: execute all the commands in the code area
3. Selection: execute the commands in the selected area
4. Loop: execute all the commands in the code area repeatedly
5. Selection Loop: execute the commands in the selected area repeatedly
There are 5 run modes:
1. Single Line: execute the command in the line where the cursor is located
2. Script: execute all the commands in the code area
3. Selection: execute the commands in the selected area
4. Loop: execute all the commands in the code area repeatedly
5. Selection Loop: execute the commands in the selected area repeatedly
- Author:
- Jaffe2718
-
Field Summary
Modifier and TypeFieldDescriptionstatic Thread
The thread to execute the mc commandstatic boolean
the flag to kill the thread -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
execute
(org.fxmisc.richtext.CodeArea codeArea, javafx.scene.control.ComboBox<String> runModeComboBox, javafx.scene.control.Button runButton) Execute the command in the code areastatic void
executeMcShell
(javafx.scene.control.TextArea terminal, javafx.scene.control.TextField cmdSrc) Execute the single line Minecraft commandstatic void
executeSysCmd
(@NotNull javafx.scene.control.TextArea terminal, @NotNull javafx.scene.control.TextField cmdSrc) Execute the system command
-
Field Details
-
executeThread
The thread to execute the mc command -
killThread
public static boolean killThreadthe flag to kill the thread
-
-
Constructor Details
-
CmdExecutor
public CmdExecutor()
-
-
Method Details
-
execute
public static void execute(org.fxmisc.richtext.CodeArea codeArea, javafx.scene.control.ComboBox<String> runModeComboBox, javafx.scene.control.Button runButton) Execute the command in the code area- Parameters:
codeArea
- the code arearunModeComboBox
- the run mode combo boxrunButton
- the run button to change the icon
-
executeMcShell
public static void executeMcShell(javafx.scene.control.TextArea terminal, javafx.scene.control.TextField cmdSrc) Execute the single line Minecraft command- Parameters:
terminal
- the terminal to show the resultcmdSrc
- the source of the command
-
executeSysCmd
public static void executeSysCmd(@NotNull @NotNull javafx.scene.control.TextArea terminal, @NotNull @NotNull javafx.scene.control.TextField cmdSrc) Execute the system command- Parameters:
terminal
- the terminal to show the resultcmdSrc
- the source of the command
-