NOT FINISHED! 1.13-pre7 - even more patches!
Patches, patches everywhere!
This commit is contained in:
@@ -15,25 +15,23 @@ also adding some additional logging in order to help work out what is causing
|
||||
random disconnections for clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 08211a54c..72474a88e 100644
|
||||
index 2255b8ccb..20bac8bc3 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
}
|
||||
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
||||
- PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.x()); // CraftBukkit
|
||||
+ //PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.x()); // CraftBukkit // Paper - This shouldn't be on the main thread
|
||||
if (this.g && packetplayinkeepalive.a() == this.h) {
|
||||
int i = (int) (this.d() - this.f);
|
||||
- PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.getWorldServer()); // CraftBukkit
|
||||
+ PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.getWorldServer()); // CraftBukkit // Paper - This shouldn't be on the main thread
|
||||
if (this.g && packetplayinkeepalive.b() == this.h) {
|
||||
int i = (int) (SystemUtils.b() - this.f);
|
||||
|
||||
this.player.ping = (this.player.ping * 3 + i) / 4;
|
||||
this.g = false;
|
||||
} else if (!this.player.getName().equals(this.minecraftServer.Q())) {
|
||||
} else if (!this.player.getDisplayName().getString().equals(this.minecraftServer.I())) {
|
||||
- this.disconnect(new ChatMessage("disconnect.timeout", new Object[0]));
|
||||
+ // Paper start - This needs to be handled on the main thread for plugins
|
||||
+ PlayerConnection.LOGGER.warn("{} sent an invalid keepalive! pending keepalive: {} got id: {} expected id: {}",
|
||||
+ this.player.getName(), this.isPendingPing(), packetplayinkeepalive.a(), this.getKeepAliveID());
|
||||
+ minecraftServer.postToMainThread(() -> {
|
||||
+ this.disconnect(new ChatMessage("disconnect.timeout", new Object[0]));
|
||||
+ });
|
||||
|
||||
Reference in New Issue
Block a user