From 230a939ea2d61acef37832bca98b13ed96454693 Mon Sep 17 00:00:00 2001 From: fdai7430 Date: Sat, 28 Jan 2023 14:06:51 +0100 Subject: [PATCH] Enemy mobs now attack player when in combat --- .../java/org/bitbiome/commands/UseCommand.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/org/bitbiome/commands/UseCommand.java b/src/main/java/org/bitbiome/commands/UseCommand.java index bf09152..8c4d555 100644 --- a/src/main/java/org/bitbiome/commands/UseCommand.java +++ b/src/main/java/org/bitbiome/commands/UseCommand.java @@ -13,6 +13,22 @@ public class UseCommand implements CommandAPI { System.out.println(getUseMessage(message.split(" ", 2)[1], engine)); if(engine.getPlayer().getHp() <= 0) System.exit(0); + Location loc = engine.getPlayer().getLocation(); + ArrayList mobs = loc.getMobList(); + for(int i = 0; i 0); }