diff --git a/src/main/java/org/bitbiome/commands/CommandListener.java b/src/main/java/org/bitbiome/commands/CommandListener.java index d1dd278..b1a5378 100644 --- a/src/main/java/org/bitbiome/commands/CommandListener.java +++ b/src/main/java/org/bitbiome/commands/CommandListener.java @@ -16,6 +16,7 @@ public class CommandListener { commands.put("exit", new QuitCommand()); commands.put("quit", new QuitCommand()); + commands.put("location", new LocationCommand()); } public HashMap returnCommands() { diff --git a/src/main/java/org/bitbiome/commands/LocationCommand.java b/src/main/java/org/bitbiome/commands/LocationCommand.java new file mode 100644 index 0000000..5b690d0 --- /dev/null +++ b/src/main/java/org/bitbiome/commands/LocationCommand.java @@ -0,0 +1,13 @@ +package org.bitbiome.commands; + +import org.bitbiome.classes.TravelEngine; + +import java.util.Scanner; + +public class LocationCommand implements CommandAPI{ + + @Override + public void performCommand(Scanner scanner, boolean isRunning, String message, TravelEngine travelEngine) { + System.out.println("Du befindest dich gerade hier: " + travelEngine.getPlayer().getLocation().getName()); + } +}