13
0
geforkt von Mirrors/Paper

SPIGOT-709: Extend the block place limit to arm swings

Dieser Commit ist enthalten in:
Thinkofdeath 2015-03-15 22:09:27 +00:00
Ursprung 98750ee399
Commit 68c9a6e117

Datei anzeigen

@ -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;
--