Skip to content

Commit

Permalink
fix: backpack unable to load message apears on every interaction (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
NgLoader authored Dec 29, 2023
1 parent 43fa3bc commit 1f28a6f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions zip-plugin/src/main/java/net/imprex/zip/BackpackListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ public void onPlayerDropItem(PlayerDropItemEvent event) {
public void onPlayerInteract(PlayerInteractEvent event) {
if ((event.getAction() == Action.RIGHT_CLICK_AIR
|| event.getAction() == Action.RIGHT_CLICK_BLOCK)
&& event.getHand() == EquipmentSlot.HAND) {
if (this.backpackHandler.isBackpack(event.getItem())) {
event.setCancelled(true);
}
&& event.getHand() == EquipmentSlot.HAND
&& this.backpackHandler.isBackpack(event.getItem())) {
event.setCancelled(true);

Backpack backpack = this.backpackHandler.getBackpack(event.getItem());
if (backpack != null) {
Expand Down

0 comments on commit 1f28a6f

Please sign in to comment.