Skip to content

Commit

Permalink
prevent uncancelling event
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Mar 5, 2024
1 parent 4d0b19f commit 1f613ae
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void onPacketReceiving(PacketEvent event) {
final int slot = this.getSlot(packet);

if (slot != -999 && slot != -1) {
event.setCancelled(slot < 0);
if (slot < 0) event.setCancelled(true);
return;
}

Expand All @@ -55,10 +55,10 @@ public void onPacketReceiving(PacketEvent event) {
event.setCancelled(true);
return;
case THROW:
event.setCancelled(slot == -1);
if (slot == -1) event.setCancelled(true);
return;
case QUICK_MOVE:
event.setCancelled(slot == -999);
if (slot == -999) event.setCancelled(true);
}
} catch (Exception e) {
LogUtil.moduleLog(Level.WARNING, "window-click-crash-patch",
Expand Down

0 comments on commit 1f613ae

Please sign in to comment.