Make tab complete spam check more lenient.

This commit is contained in:
md_5 2015-02-20 15:17:38 +11:00
parent 3fc97ff11a
commit b6e327256c

View file

@ -1,5 +1,5 @@
--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerConnection.java 2015-01-06 20:20:56.507791620 +0000
+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-01-06 20:20:56.507791620 +0000
--- ../work/decompile-8eb82bde/net/minecraft/server/PlayerConnection.java 2015-02-20 15:17:19.419840293 +1100
+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-02-20 15:17:19.423840297 +1100
@@ -16,6 +16,48 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -1363,7 +1363,7 @@
public void a(PacketPlayInTabComplete packetplayintabcomplete) {
PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.u());
+ // CraftBukkit start
+ if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
+ if (chatSpamField.addAndGet(this, 10) > 500 && !this.minecraftServer.getPlayerList().isOp(this.player.getProfile())) {
+ this.disconnect("disconnect.spam");
+ return;
+ }