diff --git a/src/main/java/org/bitbiome/commands/UseCommand.java b/src/main/java/org/bitbiome/commands/UseCommand.java index 4302f7d..d35b331 100644 --- a/src/main/java/org/bitbiome/commands/UseCommand.java +++ b/src/main/java/org/bitbiome/commands/UseCommand.java @@ -26,11 +26,12 @@ public class UseCommand implements CommandAPI { if(message.length == 1) return useItem(item, player); String targetName = message[1]; - ArrayList mobs = player.getLocation().getMobList(); + Location loc = player.getLocation(); + ArrayList mobs = loc.getMobList(); for(int j = 0; j=hp) { + location.getMobList().remove(target); + return "You killed " + target.getName() + " with " + item.getName(); + } + target.setHp(hp-dmg); + target.setFriendly(false); + return "You used " + item.getName() + " on " + target.getName(); } } \ No newline at end of file