This command quits the game with exit code 0.
@ -11,6 +11,9 @@ public class CommandListener {
commands = new HashMap<>();
commands.put("help", new HelpCommand());
commands.put("exit", new QuitCommand());
commands.put("quit", new QuitCommand());
}
public HashMap<String, CommandAPI> returnCommands() {
@ -0,0 +1,12 @@
package org.bitbiome.commands;
import java.util.Scanner;
public class QuitCommand implements CommandAPI {
@Override
public void performCommand(Scanner scanner, boolean isRunning, String message) {
System.out.println("You quitted!");
System.exit(0);