Skip to content

Commit

Permalink
exempt 1.7 in post for HELD_ITEM_CHANGE packets
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Sep 1, 2024
1 parent 7add2b6 commit a765065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/ac/grim/grimac/checks/impl/post/PostCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public void onPacketReceive(final PacketReceiveEvent event) {
}
post.clear();
sentFlying = false;
} else if (PLAYER_ABILITIES.equals(packetType) || HELD_ITEM_CHANGE.equals(packetType)
} else if (PLAYER_ABILITIES.equals(packetType)
|| (HELD_ITEM_CHANGE.equals(packetType) && player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_8))
|| INTERACT_ENTITY.equals(packetType) || PLAYER_BLOCK_PLACEMENT.equals(packetType)
|| USE_ITEM.equals(packetType) || PLAYER_DIGGING.equals(packetType)) {
if (sentFlying) post.add(event.getPacketType());
Expand Down

0 comments on commit a765065

Please sign in to comment.