diff --git a/src/main/java/org/bitbiome/commands/UseCommand.java b/src/main/java/org/bitbiome/commands/UseCommand.java index 135b669..041d4e4 100644 --- a/src/main/java/org/bitbiome/commands/UseCommand.java +++ b/src/main/java/org/bitbiome/commands/UseCommand.java @@ -10,9 +10,11 @@ public class UseCommand implements CommandAPI { private String getUseMessage(String msg) { String message[] = msg.split(" on "); - String returnString = "You used " + msg; - if(message.length == 1) - returnString+=" on yourself"; + String returnString = useItem(message[0], message[1]); return returnString; } + + private String useItem(String item, String target) { + return "You used " + item + " on " + target; + } } \ No newline at end of file