Class CmdExecutor

java.lang.Object
github.jaffe2718.mccs.jfx.unit.CmdExecutor

public class CmdExecutor extends Object
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
Author:
Jaffe2718
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Thread
    The thread to execute the mc command
    static boolean
    the flag to kill the thread
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    static void
    executeMcShell(javafx.scene.control.TextArea terminal, javafx.scene.control.TextField cmdSrc)
    Execute the single line Minecraft command
    static void
    executeSysCmd(@NotNull javafx.scene.control.TextArea terminal, @NotNull javafx.scene.control.TextField cmdSrc)
    Execute the system command

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • executeThread

      public static Thread executeThread
      The thread to execute the mc command
    • killThread

      public static boolean killThread
      the 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 area
      runModeComboBox - the run mode combo box
      runButton - 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 result
      cmdSrc - 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 result
      cmdSrc - the source of the command