mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-22 12:43:29 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6990)
This commit is contained in:
parent
0f7314ee80
commit
57c673412d
7 changed files with 15 additions and 14 deletions
|
@ -127,8 +127,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
org.apache.logging.log4j.LogManager.getLogger().debug("Failed to check connection throttle", t);
|
org.apache.logging.log4j.LogManager.getLogger().debug("Failed to check connection throttle", t);
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
//if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
// Paper end
|
||||||
String[] split = packet.hostName.split("\00");
|
// 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
|
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
|
||||||
+ // Paper start - Unix domain socket support
|
+ // Paper start - Unix domain socket support
|
||||||
+ java.net.SocketAddress socketAddress = connection.getRemoteAddress();
|
+ java.net.SocketAddress socketAddress = connection.getRemoteAddress();
|
||||||
|
|
|
@ -20,9 +20,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
public ServerHandshakePacketListenerImpl(MinecraftServer server, Connection connection) {
|
public ServerHandshakePacketListenerImpl(MinecraftServer server, Connection connection) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
// Spigot Start
|
if (!handledByEvent && proxyLogicEnabled) {
|
||||||
//if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
// Paper end
|
||||||
String[] split = packet.hostName.split("\00");
|
// 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.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
|
||||||
+ if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
|
+ if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
|
||||||
packet.hostName = split[0];
|
packet.hostName = split[0];
|
||||||
|
|
|
@ -37,12 +37,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ handledByEvent = true; // Hooray, we did it!
|
+ 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
|
// Spigot Start
|
||||||
|
String[] split = packet.hostName.split("\00");
|
||||||
- if (org.spigotmc.SpigotConfig.bungee) {
|
- if (org.spigotmc.SpigotConfig.bungee) {
|
||||||
+ //if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
+ // Don't try and handle default logic if it's been handled by the event.
|
||||||
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.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
|
||||||
packet.hostName = split[0];
|
packet.hostName = split[0];
|
||||||
|
connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
|
||||||
|
|
|
@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
|
|
||||||
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
|
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
|
+ // Paper start - prevent position desync
|
||||||
+ if (this.awaitingPositionFromClient != null) {
|
+ if (this.awaitingPositionFromClient != null) {
|
||||||
+ return; // ... thanks Mojang for letting move calls teleport across dimensions.
|
+ 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
|
Loading…
Add table
Reference in a new issue