Fixed shop info item when in off hand

This commit is contained in:
Eric 2017-07-30 13:11:12 +02:00
parent 49d90da57a
commit 51a0813473

View File

@ -415,7 +415,7 @@ public class ShopInteractListener implements Listener {
if (e.getAction() == Action.RIGHT_CLICK_BLOCK || e.getAction() == Action.LEFT_CLICK_BLOCK) {
ItemStack item = Utils.getItemInMainHand(p);
if (item == null || !(infoItem.getType() == item.getType() && infoItem.getDurability() == item.getDurability())) {
item = Utils.getItemInMainHand(p);
item = Utils.getItemInOffHand(p);
if (item != null && infoItem.getType() == item.getType() && infoItem.getDurability() == item.getDurability()) {
e.setCancelled(true);
info(p, shop);