mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-18 16:25:14 +01:00
Fix compilation errors
This commit is contained in:
parent
ec0272de13
commit
2bb8478252
@ -1,4 +1,4 @@
|
||||
From 5d1c639bff7f441f38b883b3003de1a1db6892b3 Mon Sep 17 00:00:00 2001
|
||||
From 6a0de8838bbeae629fa93f378c5de9a96a77e567 Mon Sep 17 00:00:00 2001
|
||||
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
|
||||
Date: Thu, 7 Oct 2021 21:37:24 -0300
|
||||
Subject: [PATCH] Custom motd system
|
||||
@ -601,7 +601,7 @@ index 00000000..0b039c79
|
||||
+
|
||||
+}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index abed08d4..ea5ffb11 100644
|
||||
index abed08d4..17a6d422 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -23,6 +23,8 @@ import javax.crypto.spec.SecretKeySpec;
|
||||
@ -613,20 +613,15 @@ index abed08d4..ea5ffb11 100644
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
@@ -275,8 +277,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -275,7 +277,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
Preconditions.checkState( thisState == State.STATUS, "Not expecting STATUS" );
|
||||
|
||||
ServerInfo forced = AbstractReconnectHandler.getForcedHost( this );
|
||||
- final String motd = ( forced != null ) ? forced.getMotd() : listener.getMotd();
|
||||
- final int protocol = ( ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
|
||||
+
|
||||
+ // FlameCord - Custom motd system
|
||||
+ // Make the protocol not final
|
||||
+ int protocol = ( ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
|
||||
final int protocol = ( ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
|
||||
|
||||
Callback<ServerPing> pingBack = new Callback<ServerPing>()
|
||||
{
|
||||
@@ -338,7 +342,56 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -338,7 +339,53 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
( (BungeeServerInfo) forced ).ping( pingBack, handshake.getProtocolVersion() );
|
||||
} else
|
||||
{
|
||||
@ -659,9 +654,6 @@ index abed08d4..ea5ffb11 100644
|
||||
+
|
||||
+ if (config.isProtocolEnabled()) {
|
||||
+ protocolName = config.getProtocolName();
|
||||
+
|
||||
+ // Set the protocol to -1 to show up protocol name
|
||||
+ protocol = -1;
|
||||
+ } else {
|
||||
+ protocolName = bungee.getName() + " " + bungee.getGameVersion();
|
||||
+ }
|
||||
@ -678,7 +670,7 @@ index abed08d4..ea5ffb11 100644
|
||||
+ }
|
||||
+
|
||||
+ pingBack.done( new ServerPing(
|
||||
+ new ServerPing.Protocol( protocolName, protocol ),
|
||||
+ new ServerPing.Protocol( protocolName, config.isProtocolEnabled() ? -1 : protocol ),
|
||||
+ new ServerPing.Players( maxPlayers, onlinePlayers, sample ),
|
||||
+ motd, BungeeCord.getInstance().config.getFaviconObject() ), null );
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 7d0b3d549c1ce54e990b92deffd9e902f371b932 Mon Sep 17 00:00:00 2001
|
||||
From 55a4cd7ea03250f77adbb6a4db54e5b6806a561e Mon Sep 17 00:00:00 2001
|
||||
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
|
||||
Date: Fri, 25 Feb 2022 12:28:31 -0300
|
||||
Subject: [PATCH] InitialHandler Processing State
|
||||
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index ea5ffb11..7d654e7f 100644
|
||||
index 17a6d422..76186242 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -132,12 +132,12 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@ -30,8 +30,8 @@ index ea5ffb11..7d654e7f 100644
|
||||
+ thisState = State.PROCESSING;
|
||||
|
||||
ServerInfo forced = AbstractReconnectHandler.getForcedHost( this );
|
||||
|
||||
@@ -404,6 +405,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
final int protocol = ( ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
|
||||
@@ -398,6 +399,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
{
|
||||
// FlameCord - Never accept invalid packets
|
||||
Preconditions.checkState( thisState == State.PING, "Not expecting PING" );
|
||||
@ -39,7 +39,7 @@ index ea5ffb11..7d654e7f 100644
|
||||
|
||||
unsafe.sendPacket( ping );
|
||||
|
||||
@@ -415,6 +417,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -409,6 +411,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
public void handle(Handshake handshake) throws Exception
|
||||
{
|
||||
Preconditions.checkState( thisState == State.HANDSHAKE, "Not expecting HANDSHAKE" );
|
||||
@ -47,7 +47,7 @@ index ea5ffb11..7d654e7f 100644
|
||||
this.handshake = handshake;
|
||||
ch.setVersion( handshake.getProtocolVersion() );
|
||||
ch.getHandle().pipeline().remove( PipelineUtils.LEGACY_KICKER );
|
||||
@@ -488,6 +491,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -482,6 +485,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
public void handle(LoginRequest loginRequest) throws Exception
|
||||
{
|
||||
Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" );
|
||||
@ -55,7 +55,7 @@ index ea5ffb11..7d654e7f 100644
|
||||
|
||||
if ( !AllowedCharacters.isValidName( loginRequest.getData(), onlineMode ) )
|
||||
{
|
||||
@@ -824,14 +828,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -818,14 +822,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public void setOnlineMode(boolean onlineMode)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7ef9d2d1d78b4097f5659b7c39339cd2f54fc5cc Mon Sep 17 00:00:00 2001
|
||||
From 90614978e2607cb8f7002ca92f86eef141f07513 Mon Sep 17 00:00:00 2001
|
||||
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
|
||||
Date: Fri, 4 Mar 2022 13:35:53 -0300
|
||||
Subject: [PATCH] Antibot System
|
||||
@ -1515,7 +1515,7 @@ index fb81adee..173b47f3 100644
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index 7d654e7f..e493babc 100644
|
||||
index 76186242..fb059af6 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -22,7 +22,8 @@ import javax.crypto.SecretKey;
|
||||
@ -1528,7 +1528,7 @@ index 7d654e7f..e493babc 100644
|
||||
import dev._2lstudios.flamecord.configuration.FlameConfig;
|
||||
import dev._2lstudios.flamecord.configuration.FlameCordConfiguration;
|
||||
import lombok.Getter;
|
||||
@@ -448,6 +449,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -442,6 +443,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1540,7 +1540,7 @@ index 7d654e7f..e493babc 100644
|
||||
switch ( handshake.getRequestedProtocol() )
|
||||
{
|
||||
case 1:
|
||||
@@ -459,6 +465,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -453,6 +459,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
}
|
||||
thisState = State.STATUS;
|
||||
ch.setProtocol( Protocol.STATUS );
|
||||
@ -1563,7 +1563,7 @@ index 7d654e7f..e493babc 100644
|
||||
break;
|
||||
case 2:
|
||||
// Login
|
||||
@@ -470,6 +492,21 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -464,6 +486,21 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
thisState = State.USERNAME;
|
||||
ch.setProtocol( Protocol.LOGIN );
|
||||
|
||||
@ -1585,7 +1585,7 @@ index 7d654e7f..e493babc 100644
|
||||
if ( !ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) )
|
||||
{
|
||||
if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() )
|
||||
@@ -534,6 +571,58 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -528,6 +565,58 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ba4fc7fab09928f0c8dacc872e12c4c580ffcf3f Mon Sep 17 00:00:00 2001
|
||||
From 225edfb76492efe4a8da98c8c409833e55dd29a2 Mon Sep 17 00:00:00 2001
|
||||
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
|
||||
Date: Fri, 4 Mar 2022 14:09:35 -0300
|
||||
Subject: [PATCH] Allow Invalid Names
|
||||
@ -30,10 +30,10 @@ index 92772d84..45cedb88 100644
|
||||
loadAntibot(configuration, whitelistedAddresses);
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index e493babc..91608a62 100644
|
||||
index fb059af6..e7d9615b 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -530,7 +530,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -524,7 +524,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" );
|
||||
thisState = State.PROCESSING_USERNAME;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 05eccf5906fa6f137b08ded2215473c786826a6f Mon Sep 17 00:00:00 2001
|
||||
From 2a2888ef82e36588d5b507ff0c2bd7542fead254 Mon Sep 17 00:00:00 2001
|
||||
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
|
||||
Date: Tue, 10 Jan 2023 16:37:13 -0300
|
||||
Subject: [PATCH] Dont Process Links For Kick Messages
|
||||
@ -117,10 +117,10 @@ index 4371374a..2bb27e67 100644
|
||||
* The text of the component that will be displayed to the client
|
||||
*/
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index 91608a62..c2546d80 100644
|
||||
index e7d9615b..b26015da 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -855,7 +855,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -849,7 +849,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
{
|
||||
if ( canSendKickMessage() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user