Browse Source

If something does damage, you can attack with it, not the other way around.

remotes/origin/fight-engine
fdai7430 2 years ago
parent
commit
6a4f417eee
  1. 2
      src/main/java/org/bitbiome/commands/UseCommand.java

2
src/main/java/org/bitbiome/commands/UseCommand.java

@ -42,7 +42,7 @@ private boolean combat = false;
for(int i = 0; i<inv.size(); i++) { for(int i = 0; i<inv.size(); i++) {
Item item = inv.get(i); Item item = inv.get(i);
if(item.getName().equals(itemName)) { if(item.getName().equals(itemName)) {
if(item.doesDamage())
if(!item.doesDamage())
return "You can't attack with this."; return "You can't attack with this.";
if(message.length == 1) if(message.length == 1)
return useItem(item, player); return useItem(item, player);

Loading…
Cancel
Save