Skip to content

Commit 3844279

Browse files
committed
Fixed gun duplication
Closes #602
1 parent 97cc112 commit 3844279

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/me/zombie_striker/qg/listener/QAListener.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ public void oninvClick(final InventoryClickEvent e) {
248248
// restore placed item because cancelling an event seems to wipe it.
249249
// it will make cursor item look disappeared, but it'll be dropped when inventory is closed
250250
e.getView().setCursor(cursor);
251+
} else {
252+
ItemStack item = e.getCurrentItem();
253+
254+
if (e.getSlot() == OFFHAND_SLOT && QualityArmory.isGun(item)) {
255+
e.setCancelled(true);
256+
}
251257
}
252258
}
253259

src/main/resources/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.0.17
2+
- 1.21.4 support
3+
- Fixed gun duplication
4+
15
2.0.16
26
- Fixed invalid air drop
37
- 1.21.3 support

0 commit comments

Comments
 (0)