mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-02-16 03:41:20 +01:00
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing BungeeCord Changes: 1a807731 #3567: Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.2 to 3.6.3 772ad995 #3566: Bump actions/setup-java from 3 to 4 2431c40a #3562: Bump io.netty:netty-bom from 4.1.100.Final to 4.1.101.Final 8144ae8d #3555: Bump com.mysql:mysql-connector-j from 8.1.0 to 8.2.0 0757c39a Attempt upgrade of resolver libraries
76 lines
3.4 KiB
Diff
76 lines
3.4 KiB
Diff
From b5665dfdc09e8f793fef67533e0b7bc77696e86f Mon Sep 17 00:00:00 2001
|
|
From: xDark <aleshkailyashevich@gmail.com>
|
|
Date: Fri, 31 May 2019 08:11:31 +0300
|
|
Subject: [PATCH] Allow to disable tablist rewrite
|
|
|
|
|
|
diff --git a/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java b/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
|
index 4a198ee9..d69463f0 100644
|
|
--- a/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
|
+++ b/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
|
@@ -255,4 +255,10 @@ public interface ProxyConfig
|
|
* @return Should we disable entity metadata rewriting?
|
|
*/
|
|
boolean isDisableEntityMetadataRewrite();
|
|
+
|
|
+ /**
|
|
+ * Whether tablist rewriting should be disabled or not
|
|
+ * @return {@code true} if tablist rewriting is disabled, {@code false} otherwise
|
|
+ */
|
|
+ boolean isDisableTabListRewrite();
|
|
}
|
|
diff --git a/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
|
index e860214f..b88e3c8a 100644
|
|
--- a/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
|
+++ b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
|
@@ -43,6 +43,7 @@ public class WaterfallConfiguration extends Configuration {
|
|
private boolean disableModernTabLimiter = true;
|
|
|
|
private boolean disableEntityMetadataRewrite = false;
|
|
+ private boolean disableTabListRewrite = true;
|
|
|
|
@Override
|
|
public void load() {
|
|
@@ -56,6 +57,7 @@ public class WaterfallConfiguration extends Configuration {
|
|
tabThrottle = config.getInt("throttling.tab_complete", tabThrottle);
|
|
disableModernTabLimiter = config.getBoolean("disable_modern_tab_limiter", disableModernTabLimiter);
|
|
disableEntityMetadataRewrite = config.getBoolean("disable_entity_metadata_rewrite", disableEntityMetadataRewrite);
|
|
+ disableTabListRewrite = config.getBoolean("disable_tab_list_rewrite", disableTabListRewrite);
|
|
}
|
|
|
|
@Override
|
|
@@ -87,4 +89,9 @@ public class WaterfallConfiguration extends Configuration {
|
|
public boolean isDisableEntityMetadataRewrite() {
|
|
return disableEntityMetadataRewrite;
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean isDisableTabListRewrite() {
|
|
+ return disableTabListRewrite;
|
|
+ }
|
|
}
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
index 42232443..747916d1 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
@@ -174,8 +174,14 @@ public class DownstreamBridge extends PacketHandler
|
|
@Override
|
|
public void handle(PlayerListItem playerList) throws Exception
|
|
{
|
|
- con.getTabListHandler().onUpdate( TabList.rewrite( playerList ) );
|
|
- throw CancelSendSignal.INSTANCE; // Always throw because of profile rewriting
|
|
+ //Waterfall start
|
|
+ boolean skipRewrites = bungee.getConfig().isDisableTabListRewrite();
|
|
+ con.getTabListHandler().onUpdate( skipRewrites ? playerList : TabList.rewrite( playerList ) );
|
|
+ if ( !skipRewrites )
|
|
+ {
|
|
+ throw CancelSendSignal.INSTANCE; // Only throw if profile rewriting is enabled
|
|
+ }
|
|
+ // Waterfall end
|
|
}
|
|
|
|
@Override
|
|
--
|
|
2.43.0
|
|
|