mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 22:52:13 -07:00
Move to configurate for paper.yml (#7609)
This commit is contained in:
@@ -16,20 +16,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||
implementation("org.apache.logging.log4j:log4j-slf4j18-impl:2.17.1") // Paper
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
private static void useDimensionTypeForCustomSpawners() {
|
||||
useDimensionTypeForCustomSpawners = getBoolean("settings.use-dimension-type-for-custom-spawners", false);
|
||||
}
|
||||
+
|
||||
+ public static boolean useProxyProtocol;
|
||||
+ private static void useProxyProtocol() {
|
||||
+ useProxyProtocol = getBoolean("settings.proxy-protocol", false);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -39,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - indicate Proxy Protocol usage
|
||||
+ if (com.destroystokyo.paper.PaperConfig.useProxyProtocol) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.proxyProtocol) {
|
||||
+ ServerConnectionListener.LOGGER.info("Paper: Using Proxy Protocol");
|
||||
+ }
|
||||
+ // Paper end
|
||||
@@ -52,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
Object object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND);
|
||||
|
||||
+ // Paper start - Add support for Proxy Protocol
|
||||
+ if (com.destroystokyo.paper.PaperConfig.useProxyProtocol) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.proxyProtocol) {
|
||||
+ channel.pipeline().addAfter("timeout", "haproxy-decoder", new io.netty.handler.codec.haproxy.HAProxyMessageDecoder());
|
||||
+ channel.pipeline().addAfter("haproxy-decoder", "haproxy-handler", new ChannelInboundHandlerAdapter() {
|
||||
+ @Override
|
||||
|
Reference in New Issue
Block a user