Skip to content

Commit

Permalink
Add exit console command
Browse files Browse the repository at this point in the history
  • Loading branch information
CominAtYou committed Jun 5, 2024
1 parent 938fb68 commit 9648003
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/cominatyou/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Console {
entry("send", new Send()),
entry("cc", new ChangeChannel()),
entry("edit", new Edit()),
entry("exit", new Exit()),
entry("clear", new Clear())
);

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/cominatyou/console/consolecommands/Exit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.cominatyou.console.consolecommands;

import java.util.List;

public class Exit implements ConsoleCommand {
@Override
public void execute(List<String> args) {
System.exit(0);
}

}

0 comments on commit 9648003

Please sign in to comment.