diff --git a/src/main/java/rina/onepop/club/api/tracker/impl/WindowClickTracker.java b/src/main/java/rina/onepop/club/api/tracker/impl/WindowClickTracker.java index 7d5f47c..436adab 100644 --- a/src/main/java/rina/onepop/club/api/tracker/impl/WindowClickTracker.java +++ b/src/main/java/rina/onepop/club/api/tracker/impl/WindowClickTracker.java @@ -30,9 +30,15 @@ public WindowClickTracker(int windowId, int slotId, int mouseButton, ClickType t @Override public void onPre() { - short short1 = player.openContainer.getNextTransactionID(player.inventory); - ItemStack itemstack = player.openContainer.slotClick(slotId, mouseButton, type, player); + boolean flush = true; - this.setPacket(new CPacketClickWindow(windowId, slotId, mouseButton, type, itemstack, short1)); + try { + short short1 = player.openContainer.getNextTransactionID(player.inventory); + ItemStack itemstack = player.openContainer.slotClick(slotId, mouseButton, type, player); + + this.setPacket(new CPacketClickWindow(windowId, slotId, mouseButton, type, itemstack, short1)); + } catch (Exception exc) { + flush = false; + } } -} +} \ No newline at end of file