mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 11:58:06 +01:00
81806abef6
Due to the changes in 1.13, clients will send a tab completion request for all bukkit commands in order to factor in the lack of support for brigadier and provide backwards support in the API. Craftbukkit, however; has moved the chat spam limiter to also interact with the tab completion request, which while good for avoiding abuse, causes 1.13 clients to easilly be kicked from a server in bukkit due to this. Removing the spam limit could cause issues for servers, however, there is no way for servers to manipulate this without blindly cancelling kick events, which only causes additional complications. This also causes issues in that the tab spam limit and chat share the same field but different limits, meaning that a player having typed a long command may be kicked from the server. Splitting the field up and making it configurable allows for server owners to take the burden of this into their own hand without having to rely on plugins doing unsafe things. This patch has been applied to 1.12.2 in order to allow people using plugins which allow clients of newer versions to connect, this is not a common practice, however is being done as a level of nicety given the current status of 1.13
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
From 51c81d45776fa1901de554be33144437e447d69b Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 28 Mar 2016 21:22:26 -0400
|
|
Subject: [PATCH] EntityPathfindEvent
|
|
|
|
Fires when an Entity decides to start moving to a location.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
index cc44d30b57..3ac6f84d35 100644
|
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
|
@@ -4,7 +4,7 @@ import javax.annotation.Nullable;
|
|
|
|
public abstract class NavigationAbstract {
|
|
|
|
- protected EntityInsentient a;
|
|
+ protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER
|
|
protected World b;
|
|
@Nullable
|
|
protected PathEntity c;
|
|
@@ -74,6 +74,7 @@ public abstract class NavigationAbstract {
|
|
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
|
return this.c;
|
|
} else {
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
|
|
this.q = blockposition;
|
|
float f = this.i();
|
|
|
|
@@ -98,6 +99,7 @@ public abstract class NavigationAbstract {
|
|
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
|
return this.c;
|
|
} else {
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper
|
|
this.q = blockposition;
|
|
float f = this.i();
|
|
|
|
--
|
|
2.18.0
|
|
|