Skip to content

Commit

Permalink
Update BadPacketsQ.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Mar 17, 2024
1 parent 57b4f3a commit 9fc46a9
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ public void onPacketReceive(PacketReceiveEvent event) {
if (event.getPacketType() == Client.ENTITY_ACTION) {
WrapperPlayClientEntityAction wrapper = new WrapperPlayClientEntityAction(event);

if (wrapper.getAction() == Action.START_JUMPING_WITH_HORSE) {
if (wrapper.getJumpBoost() < 0 || wrapper.getJumpBoost() > 100) {
if (flag()) {
alert("b=" + wrapper.getJumpBoost()); // Ban
if (shouldModifyPackets()) {
event.setCancelled(true);
}
}
if (wrapper.getJumpBoost() < 0 || wrapper.getJumpBoost() > 100 || wrapper.getEntityId() != player.entityID || (wrapper.getAction() != Action.START_JUMPING_WITH_HORSE && wrapper.getJumpBoost() != 0)) {
if (flagAndAlert("boost=" + wrapper.getJumpBoost() + ", action=" + wrapper.getAction() + ", entity=" + wrapper.getEntityId()) && shouldModifyPackets()) {
event.setCancelled(true);
player.onPacketCancel();
}
}
}
}
}
}

0 comments on commit 9fc46a9

Please sign in to comment.