mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-12 13:41:06 +00:00
Fixed shop info item when in off hand
This commit is contained in:
parent
49d90da57a
commit
51a0813473
@ -415,7 +415,7 @@ public class ShopInteractListener implements Listener {
|
|||||||
if (e.getAction() == Action.RIGHT_CLICK_BLOCK || e.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (e.getAction() == Action.RIGHT_CLICK_BLOCK || e.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||||
ItemStack item = Utils.getItemInMainHand(p);
|
ItemStack item = Utils.getItemInMainHand(p);
|
||||||
if (item == null || !(infoItem.getType() == item.getType() && infoItem.getDurability() == item.getDurability())) {
|
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()) {
|
if (item != null && infoItem.getType() == item.getType() && infoItem.getDurability() == item.getDurability()) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
info(p, shop);
|
info(p, shop);
|
||||||
|
Loading…
Reference in New Issue
Block a user