diff --git a/CraftBukkit-Patches/0125-Limit-block-placement-interaction-packets.patch b/CraftBukkit-Patches/0125-Limit-block-placement-interaction-packets.patch index 09e81a15dd..b0f25ff0e5 100644 --- a/CraftBukkit-Patches/0125-Limit-block-placement-interaction-packets.patch +++ b/CraftBukkit-Patches/0125-Limit-block-placement-interaction-packets.patch @@ -61,4 +61,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } flag = true; +@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList + public void a(PacketPlayInArmAnimation packetplayinarmanimation) { + if (this.player.dead) return; // CraftBukkit + PlayerConnectionUtils.ensureMainThread(packetplayinarmanimation, this, this.player.u()); ++ // Spigot start ++ boolean throttled = false; ++ if (lastPlace != -1 && packetplayinarmanimation.timestamp - lastPlace < 30 && packets++ >= 4) { ++ throttled = true; ++ } else if ( packetplayinarmanimation.timestamp - lastPlace >= 30 || lastPlace == -1 ) ++ { ++ lastPlace = packetplayinarmanimation.timestamp; ++ packets = 0; ++ } ++ if (throttled) { ++ return; ++ } ++ // Spigot end + this.player.z(); + // CraftBukkit start - Raytrace to look for 'rogue armswings' + float f1 = this.player.pitch; -- \ No newline at end of file