13
0
geforkt von Mirrors/Paper

Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6990)

Dieser Commit ist enthalten in:
Jake Potrebic 2021-12-02 12:21:33 -08:00
Ursprung 0f7314ee80
Commit 57c673412d
7 geänderte Dateien mit 15 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -127,8 +127,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
org.apache.logging.log4j.LogManager.getLogger().debug("Failed to check connection throttle", t);
}
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
//if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
String[] split = packet.hostName.split("\00");
// Paper end
// if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
+ // Paper start - Unix domain socket support
+ java.net.SocketAddress socketAddress = connection.getRemoteAddress();

Datei anzeigen

@ -20,9 +20,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public ServerHandshakePacketListenerImpl(MinecraftServer server, Connection connection) {
this.server = server;
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
// Spigot Start
//if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
String[] split = packet.hostName.split("\00");
if (!handledByEvent && proxyLogicEnabled) {
// Paper end
// if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
- if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
+ if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
packet.hostName = split[0];

Datei anzeigen

@ -37,12 +37,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ handledByEvent = true; // Hooray, we did it!
+ }
+ }
+ // Don't try and handle default logic if it's been handled by the event.
+ if (!handledByEvent && proxyLogicEnabled) {
+ // Paper end
// Spigot Start
String[] split = packet.hostName.split("\00");
- if (org.spigotmc.SpigotConfig.bungee) {
+ //if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
String[] split = packet.hostName.split("\00");
+ // Don't try and handle default logic if it's been handled by the event.
+ if (!handledByEvent && proxyLogicEnabled) {
+ // Paper end
+ // if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
packet.hostName = split[0];
connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());

Datei anzeigen

@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
this.player.setOnGround(packet.isOnGround()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
+ // Paper start - prevent position desync
+ if (this.awaitingPositionFromClient != null) {
+ return; // ... thanks Mojang for letting move calls teleport across dimensions.

@ -1 +1 @@
Subproject commit fc0fe05559f00c0ef5c45d9140097c0622368b90
Subproject commit f023e77ad7343fa11812d3118efc956b67cdd242

@ -1 +1 @@
Subproject commit a0087010ac0475f8dbc57ef3f9b4a83cbbcc0f39
Subproject commit 581df1846f2b3e09b20e71fd44851f3e68f1f7db

@ -1 +1 @@
Subproject commit a5dea1cbca6d941f1980dcc92102af7081d0b0f5
Subproject commit 3c40a6c908b0a67b05ebf8f5268d64838e117d41