From 4038f1bfd5b5bb85f488b27ba45a03460868d54f Mon Sep 17 00:00:00 2001 From: David Hermann Date: Wed, 4 Jan 2023 02:45:57 +0100 Subject: [PATCH] The game loop is now checking if the command exists. --- src/main/java/org/bitbiome/InteractionLoop.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bitbiome/InteractionLoop.java b/src/main/java/org/bitbiome/InteractionLoop.java index 557585f..e2a1cd0 100644 --- a/src/main/java/org/bitbiome/InteractionLoop.java +++ b/src/main/java/org/bitbiome/InteractionLoop.java @@ -10,7 +10,9 @@ public class InteractionLoop { boolean isRunning = true; while (isRunning) { String line = input.nextLine().toLowerCase(); - System.out.println(line); + if (!Boot.instance.getCmdListener().perform(line.toLowerCase().split(" ")[0], input, isRunning, line)) { + System.out.println("Unknown Command"); + } } }