Skip to content

Commit

Permalink
add crossbow support as just a bow item
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 12, 2019
1 parent 6678863 commit cb8795e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/org/mcmonkey/sentinel/SentinelItemHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,15 @@ public ItemStack getHeldItem() {
*/
public boolean usesBow() {
ItemStack it = getHeldItem();
return it != null && it.getType() == Material.BOW && getArrow() != null;
if (it == null) {
return false;
}
if (SentinelTarget.v1_14) {
if (it.getType() == Material.CROSSBOW && getArrow() != null) {
return true;
}
}
return it.getType() == Material.BOW && getArrow() != null;
}

/**
Expand Down

0 comments on commit cb8795e

Please sign in to comment.