2022-06-08 01:38:15 +02:00
|
|
|
From 36c2b4b28806f491a6fa680be25afe6ba03179f1 Mon Sep 17 00:00:00 2001
|
2021-05-01 00:41:58 +02:00
|
|
|
From: Juan Cruz Linsalata <LinsaFTW@users.noreply.github.com>
|
2020-10-18 21:26:58 +02:00
|
|
|
Date: Mon, 12 Oct 2020 15:40:53 -0300
|
|
|
|
Subject: [PATCH] FlameCord General Patch
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/FlameCord.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/FlameCord.java
|
|
|
|
new file mode 100644
|
2022-03-09 20:10:00 +01:00
|
|
|
index 00000000..8e69160d
|
2020-10-18 21:26:58 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/FlameCord.java
|
2022-03-09 20:10:00 +01:00
|
|
|
@@ -0,0 +1,35 @@
|
2020-10-18 21:26:58 +02:00
|
|
|
+package dev._2lstudios.flamecord;
|
|
|
|
+
|
|
|
|
+import java.util.Collection;
|
|
|
|
+import java.util.logging.Logger;
|
|
|
|
+
|
|
|
|
+import dev._2lstudios.flamecord.configuration.FlameCordConfiguration;
|
|
|
|
+import lombok.Getter;
|
|
|
|
+import net.md_5.bungee.config.ConfigurationProvider;
|
|
|
|
+import net.md_5.bungee.config.YamlConfiguration;
|
|
|
|
+
|
|
|
|
+public class FlameCord {
|
|
|
|
+ @Getter
|
|
|
|
+ private static FlameCord instance;
|
|
|
|
+
|
2022-03-09 20:10:00 +01:00
|
|
|
+ public static void reload(final Logger logger, final Collection<String> whitelistedAddresses) {
|
2020-10-18 21:26:58 +02:00
|
|
|
+ if (FlameCord.instance != null) {
|
2022-03-09 20:10:00 +01:00
|
|
|
+ instance.reload(logger);
|
|
|
|
+ } else {
|
|
|
|
+ FlameCord.instance = new FlameCord(logger, whitelistedAddresses);
|
2020-10-18 21:26:58 +02:00
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-09 20:10:00 +01:00
|
|
|
+ @Getter
|
|
|
|
+ private FlameCordConfiguration flameCordConfiguration;
|
|
|
|
+
|
|
|
|
+ private void reload(final Logger logger) {
|
2020-10-18 21:26:58 +02:00
|
|
|
+ final ConfigurationProvider configurationProvider = ConfigurationProvider.getProvider(YamlConfiguration.class);
|
|
|
|
+
|
|
|
|
+ this.flameCordConfiguration = new FlameCordConfiguration(configurationProvider);
|
|
|
|
+ }
|
2022-03-09 20:10:00 +01:00
|
|
|
+
|
|
|
|
+ private FlameCord(final Logger logger, final Collection<String> whitelistedAddresses) {
|
|
|
|
+ reload(logger);
|
|
|
|
+ }
|
2020-10-18 21:26:58 +02:00
|
|
|
+}
|
|
|
|
\ No newline at end of file
|
2022-03-06 15:57:48 +01:00
|
|
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameConfig.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameConfig.java
|
2020-10-18 21:26:58 +02:00
|
|
|
new file mode 100644
|
2022-03-06 15:57:48 +01:00
|
|
|
index 00000000..cfbd55c3
|
2020-10-18 21:26:58 +02:00
|
|
|
--- /dev/null
|
2022-03-06 15:57:48 +01:00
|
|
|
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameConfig.java
|
|
|
|
@@ -0,0 +1,38 @@
|
2020-10-18 21:26:58 +02:00
|
|
|
+package dev._2lstudios.flamecord.configuration;
|
|
|
|
+
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Collection;
|
|
|
|
+import java.util.HashSet;
|
|
|
|
+
|
|
|
|
+import net.md_5.bungee.config.Configuration;
|
|
|
|
+
|
2022-03-06 15:57:48 +01:00
|
|
|
+public class FlameConfig {
|
|
|
|
+ int setIfUnexistant(final String arg1, final int arg2, final Configuration configuration) {
|
2020-10-18 21:26:58 +02:00
|
|
|
+ return (int) setIfUnexistant(arg1, (Object) arg2, configuration);
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-06 15:57:48 +01:00
|
|
|
+ boolean setIfUnexistant(final String arg1, final boolean arg2, final Configuration configuration) {
|
2020-10-18 21:26:58 +02:00
|
|
|
+ return (boolean) setIfUnexistant(arg1, (Object) arg2, configuration);
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-06 15:57:48 +01:00
|
|
|
+ Object setIfUnexistant(final String arg1, final Object arg2, final Configuration configuration) {
|
2020-10-18 21:26:58 +02:00
|
|
|
+ if (!configuration.contains(arg1)) {
|
|
|
|
+ configuration.set(arg1, arg2);
|
|
|
|
+
|
|
|
|
+ return arg2;
|
|
|
|
+ } else {
|
|
|
|
+ return configuration.get(arg1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-06 15:57:48 +01:00
|
|
|
+ Collection<String> setIfUnexistant(final String arg1, final Collection<String> arg2,
|
2020-10-18 21:26:58 +02:00
|
|
|
+ final Configuration configuration) {
|
|
|
|
+ if (!configuration.contains(arg1)) {
|
|
|
|
+ configuration.set(arg1, new ArrayList<>(arg2));
|
|
|
|
+
|
|
|
|
+ return arg2;
|
|
|
|
+ } else {
|
|
|
|
+ return new HashSet<>(configuration.getStringList(arg1));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
2022-03-06 15:57:48 +01:00
|
|
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
|
|
|
new file mode 100644
|
|
|
|
index 00000000..c8148e90
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
|
|
|
@@ -0,0 +1,33 @@
|
|
|
|
+package dev._2lstudios.flamecord.configuration;
|
|
|
|
+
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.Collection;
|
|
|
|
+import java.util.HashSet;
|
|
|
|
+
|
|
|
|
+import lombok.Getter;
|
|
|
|
+import net.md_5.bungee.config.Configuration;
|
|
|
|
+import net.md_5.bungee.config.ConfigurationProvider;
|
|
|
|
+
|
|
|
|
+public class FlameCordConfiguration extends FlameConfig {
|
|
|
|
+ public FlameCordConfiguration(final ConfigurationProvider configurationProvider) {
|
|
|
|
+ try {
|
|
|
|
+ final String fileName = "./flamecord.yml";
|
|
|
|
+ final File configurationFile = new File(fileName);
|
|
|
|
+ final Configuration configuration;
|
|
|
|
+ final boolean configurationExists = configurationFile.exists();
|
|
|
|
+
|
|
|
|
+ if (!configurationExists) {
|
|
|
|
+ configuration = new Configuration();
|
|
|
|
+ } else {
|
|
|
|
+ configuration = configurationProvider.load(configurationFile);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ configurationProvider.save(configuration, configurationFile);
|
|
|
|
+ } catch (final IOException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
2020-10-18 21:26:58 +02:00
|
|
|
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
2021-12-30 03:02:28 +01:00
|
|
|
index 4b9b80b9..aa35f870 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
|
|
|
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
|
|
|
@@ -1,5 +1,6 @@
|
|
|
|
package net.md_5.bungee.protocol;
|
|
|
|
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
|
|
|
import io.netty.buffer.ByteBuf;
|
|
|
|
import io.netty.buffer.ByteBufUtil;
|
|
|
|
import io.netty.channel.ChannelHandlerContext;
|
|
|
|
diff --git a/proxy/src/main/java/dev/_2lstudios/flamecord/commands/FlameCordCommand.java b/proxy/src/main/java/dev/_2lstudios/flamecord/commands/FlameCordCommand.java
|
|
|
|
new file mode 100644
|
2022-03-09 20:10:00 +01:00
|
|
|
index 00000000..91d60bfb
|
2020-10-18 21:26:58 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/proxy/src/main/java/dev/_2lstudios/flamecord/commands/FlameCordCommand.java
|
2021-05-01 18:41:28 +02:00
|
|
|
@@ -0,0 +1,58 @@
|
2020-10-18 21:26:58 +02:00
|
|
|
+package dev._2lstudios.flamecord.commands;
|
|
|
|
+
|
|
|
|
+import java.util.Collection;
|
|
|
|
+import java.util.HashSet;
|
|
|
|
+
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
|
|
|
+import net.md_5.bungee.BungeeCord;
|
|
|
|
+import net.md_5.bungee.api.CommandSender;
|
|
|
|
+import net.md_5.bungee.api.chat.TextComponent;
|
|
|
|
+import net.md_5.bungee.api.config.ServerInfo;
|
|
|
|
+import net.md_5.bungee.api.plugin.Command;
|
|
|
|
+
|
|
|
|
+public class FlameCordCommand extends Command {
|
|
|
|
+private final BungeeCord bungeeCord;
|
|
|
|
+
|
|
|
|
+ public FlameCordCommand(final BungeeCord bungeeCord) {
|
|
|
|
+ super("flamecord");
|
|
|
|
+
|
|
|
|
+ this.bungeeCord = bungeeCord;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void execute(final CommandSender sender, final String[] args) {
|
|
|
|
+ final FlameCord flameCord = FlameCord.getInstance();
|
|
|
|
+
|
|
|
|
+ if (sender.hasPermission("flamecord.usage")) {
|
|
|
|
+ if (args.length > 0) {
|
|
|
|
+ final String arg0 = args[0];
|
|
|
|
+
|
|
|
|
+ switch (arg0) {
|
|
|
|
+ case "reload": {
|
|
|
|
+ // FlameCord - Collect ips from servers
|
|
|
|
+ final Collection<String> whitelistedAddresses = new HashSet<>();
|
|
|
|
+
|
|
|
|
+ for (final ServerInfo serverInfo : bungeeCord.getServers().values()) {
|
|
|
|
+ whitelistedAddresses.add(serverInfo.getSocketAddress().toString());
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-09 20:10:00 +01:00
|
|
|
+ FlameCord.reload(bungeeCord.getLogger(), whitelistedAddresses);
|
2020-10-18 21:26:58 +02:00
|
|
|
+ sender.sendMessage(TextComponent
|
2021-05-01 18:41:28 +02:00
|
|
|
+ .fromLegacyText("flamecord_reload"));
|
2020-10-18 21:26:58 +02:00
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ default: {
|
2021-05-01 18:41:28 +02:00
|
|
|
+ sender.sendMessage(TextComponent.fromLegacyText("flamecord_help"));
|
2020-10-18 21:26:58 +02:00
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ sender.sendMessage(TextComponent
|
2021-05-01 18:41:28 +02:00
|
|
|
+ .fromLegacyText("flamecord_help"));
|
2020-10-18 21:26:58 +02:00
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ sender.sendMessage(TextComponent
|
2021-05-01 18:41:28 +02:00
|
|
|
+ .fromLegacyText("flamecord_nopermission"));
|
2020-10-18 21:26:58 +02:00
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
2022-06-08 01:38:15 +02:00
|
|
|
index cd34f29f..824dfca8 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
2021-10-30 15:03:40 +02:00
|
|
|
@@ -9,6 +9,8 @@ import com.google.common.collect.Sets;
|
2020-10-18 21:26:58 +02:00
|
|
|
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
import com.google.gson.GsonBuilder;
|
|
|
|
+
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
|
|
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|
|
|
import io.github.waterfallmc.waterfall.conf.WaterfallConfiguration;
|
|
|
|
import io.github.waterfallmc.waterfall.event.ProxyExceptionEvent;
|
2021-10-30 15:03:40 +02:00
|
|
|
@@ -233,11 +235,12 @@ public class BungeeCord extends ProxyServer
|
2020-10-18 21:26:58 +02:00
|
|
|
// Waterfall end
|
|
|
|
|
|
|
|
pluginManager = new PluginManager( this );
|
|
|
|
- getPluginManager().registerCommand( null, new CommandReload() );
|
|
|
|
- getPluginManager().registerCommand( null, new CommandEnd() );
|
|
|
|
- getPluginManager().registerCommand( null, new CommandIP() );
|
|
|
|
- getPluginManager().registerCommand( null, new CommandBungee() );
|
|
|
|
- getPluginManager().registerCommand( null, new CommandPerms() );
|
|
|
|
+ // FlameCord - We register commands in our new method
|
|
|
|
+ //getPluginManager().registerCommand( null, new CommandReload() );
|
|
|
|
+ //getPluginManager().registerCommand( null, new CommandEnd() );
|
|
|
|
+ //getPluginManager().registerCommand( null, new CommandIP() );
|
|
|
|
+ //getPluginManager().registerCommand( null, new CommandBungee() );
|
|
|
|
+ //getPluginManager().registerCommand( null, new CommandPerms() );
|
|
|
|
|
|
|
|
if ( !Boolean.getBoolean( "net.md_5.bungee.native.disable" ) )
|
|
|
|
{
|
2021-10-30 15:03:40 +02:00
|
|
|
@@ -286,6 +289,15 @@ public class BungeeCord extends ProxyServer
|
2020-10-18 21:26:58 +02:00
|
|
|
pluginManager.loadPlugins();
|
|
|
|
config.load();
|
|
|
|
|
|
|
|
+ // FlameCord - Renew and register modules
|
|
|
|
+ final Collection<String> whitelistedAddresses = new HashSet<>();
|
|
|
|
+
|
|
|
|
+ for (final ServerInfo serverInfo : getServers().values()) {
|
|
|
|
+ whitelistedAddresses.add(serverInfo.getSocketAddress().toString());
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-09 20:10:00 +01:00
|
|
|
+ FlameCord.reload(logger, whitelistedAddresses);
|
2020-10-18 21:26:58 +02:00
|
|
|
+
|
|
|
|
if ( config.isForgeSupport() )
|
|
|
|
{
|
|
|
|
registerChannel( ForgeConstants.FML_TAG );
|
2022-04-26 01:49:40 +02:00
|
|
|
@@ -574,9 +586,7 @@ public class BungeeCord extends ProxyServer
|
2021-05-01 18:41:28 +02:00
|
|
|
String translation = "<translation '" + name + "' missing>";
|
|
|
|
try
|
|
|
|
{
|
2020-10-19 21:09:38 +02:00
|
|
|
- final String string = customBundle != null && customBundle.containsKey( name ) ? customBundle.getString( name ) : baseBundle.getString( name );
|
|
|
|
-
|
|
|
|
- translation = ( args.length == 0 ) ? string : MessageFormat.format( string, args );
|
2021-05-01 18:41:28 +02:00
|
|
|
+ translation = MessageFormat.format( customBundle != null && customBundle.containsKey( name ) ? customBundle.getString( name ) : baseBundle.getString( name ), args );
|
|
|
|
} catch ( MissingResourceException ex )
|
|
|
|
{
|
|
|
|
}
|
2020-10-18 21:26:58 +02:00
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
2022-06-07 21:48:14 +02:00
|
|
|
index 9067b806..cb98a8ea 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
2021-11-30 15:50:10 +01:00
|
|
|
@@ -2,6 +2,8 @@ package net.md_5.bungee;
|
2020-10-18 21:26:58 +02:00
|
|
|
|
2021-11-30 15:50:10 +01:00
|
|
|
import com.google.common.base.Joiner;
|
2020-10-18 21:26:58 +02:00
|
|
|
import com.google.common.base.Preconditions;
|
|
|
|
+
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
|
|
|
import io.netty.buffer.ByteBuf;
|
|
|
|
import io.netty.buffer.ByteBufAllocator;
|
|
|
|
import java.net.InetSocketAddress;
|
2021-11-30 15:50:10 +01:00
|
|
|
@@ -165,7 +167,7 @@ public class ServerConnector extends PacketHandler
|
2020-10-18 21:26:58 +02:00
|
|
|
{
|
|
|
|
if ( packet.packet == null )
|
|
|
|
{
|
|
|
|
- throw new QuietException( "Unexpected packet received during server login process!\n" + BufUtil.dump( packet.buf, 16 ) );
|
2021-05-01 15:58:52 +02:00
|
|
|
+ throw new QuietException( "Unexpected packet received during server connector process!\n" + BufUtil.dump(packet.buf, 16) );
|
2020-10-18 21:26:58 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
2022-06-08 01:38:15 +02:00
|
|
|
index 5293552d..89b4122c 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
2022-02-14 22:03:15 +01:00
|
|
|
@@ -35,6 +35,7 @@ import net.md_5.bungee.api.SkinConfiguration;
|
2020-10-18 21:26:58 +02:00
|
|
|
import net.md_5.bungee.api.Title;
|
|
|
|
import net.md_5.bungee.api.chat.BaseComponent;
|
|
|
|
import net.md_5.bungee.api.chat.TextComponent;
|
|
|
|
+import net.md_5.bungee.api.config.ListenerInfo;
|
|
|
|
import net.md_5.bungee.api.config.ServerInfo;
|
|
|
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
|
|
import net.md_5.bungee.api.event.PermissionCheckEvent;
|
2022-06-07 21:48:14 +02:00
|
|
|
@@ -66,6 +67,7 @@ import net.md_5.bungee.tab.ServerUnique;
|
2020-10-18 21:26:58 +02:00
|
|
|
import net.md_5.bungee.tab.TabList;
|
|
|
|
import net.md_5.bungee.util.CaseInsensitiveSet;
|
|
|
|
import net.md_5.bungee.util.ChatComponentTransformer;
|
|
|
|
+import net.md_5.bungee.util.QuietException;
|
|
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
public final class UserConnection implements ProxiedPlayer
|
2022-06-08 01:38:15 +02:00
|
|
|
@@ -393,9 +395,11 @@ public final class UserConnection implements ProxiedPlayer
|
2020-10-18 21:26:58 +02:00
|
|
|
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, request.getConnectTimeout() )
|
|
|
|
.remoteAddress( target.getAddress() );
|
|
|
|
// Windows is bugged, multi homed users will just have to live with random connecting IPs
|
|
|
|
- if ( getPendingConnection().getListener().isSetLocalAddress() && !PlatformDependent.isWindows() && getPendingConnection().getListener().getSocketAddress() instanceof InetSocketAddress )
|
|
|
|
+ // FlameCord - Use listenerInfo
|
|
|
|
+ final ListenerInfo listenerInfo = getPendingConnection().getListener();
|
|
|
|
+ if ( listenerInfo.isSetLocalAddress() && !PlatformDependent.isWindows() && listenerInfo.getSocketAddress() instanceof InetSocketAddress )
|
|
|
|
{
|
|
|
|
- b.localAddress( getPendingConnection().getListener().getHost().getHostString(), 0 );
|
|
|
|
+ b.localAddress( listenerInfo.getHost().getHostString(), 0 );
|
|
|
|
}
|
|
|
|
b.connect().addListener( listener );
|
|
|
|
}
|
|
|
|
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
|
2022-06-08 01:38:15 +02:00
|
|
|
index 72328eed..0957c1f1 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
2022-06-07 21:48:14 +02:00
|
|
|
@@ -20,6 +20,8 @@ import java.util.logging.Level;
|
2021-02-26 02:46:21 +01:00
|
|
|
import javax.crypto.SecretKey;
|
|
|
|
import javax.crypto.spec.SecretKeySpec;
|
2020-10-18 21:26:58 +02:00
|
|
|
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
2021-02-26 02:46:21 +01:00
|
|
|
+
|
2020-10-18 21:26:58 +02:00
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import net.md_5.bungee.BungeeCord;
|
2022-06-07 21:48:14 +02:00
|
|
|
@@ -159,7 +161,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
2020-10-18 21:26:58 +02:00
|
|
|
{
|
|
|
|
if ( packet.packet == null )
|
|
|
|
{
|
|
|
|
- throw new QuietException( "Unexpected packet received during login process! " + BufUtil.dump( packet.buf, 16 ) );
|
2021-05-01 15:58:52 +02:00
|
|
|
+ throw new QuietException( "Unexpected packet received during server login process!\n" + BufUtil.dump(packet.buf, 16) );
|
2020-10-18 21:26:58 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java
|
2021-10-30 15:03:40 +02:00
|
|
|
index a409d440..3503c089 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/PingHandler.java
|
2021-05-01 15:58:52 +02:00
|
|
|
@@ -1,6 +1,7 @@
|
2020-10-18 21:26:58 +02:00
|
|
|
package net.md_5.bungee.connection;
|
|
|
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
+
|
|
|
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import net.md_5.bungee.BungeeCord;
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
2022-04-26 01:49:40 +02:00
|
|
|
index 675fa8f1..c8748ce5 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
2021-05-01 00:26:03 +02:00
|
|
|
@@ -1,6 +1,8 @@
|
2020-10-18 21:26:58 +02:00
|
|
|
package net.md_5.bungee.netty;
|
|
|
|
|
|
|
|
import com.google.common.base.Preconditions;
|
|
|
|
+
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
|
|
|
import io.netty.channel.ChannelHandlerContext;
|
|
|
|
import io.netty.channel.ChannelInboundHandlerAdapter;
|
|
|
|
import io.netty.handler.codec.CorruptedFrameException;
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
2022-04-26 01:49:40 +02:00
|
|
|
index a95193ba..a4c3bd71 100644
|
2020-10-18 21:26:58 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
2021-05-01 00:26:03 +02:00
|
|
|
@@ -1,6 +1,8 @@
|
2020-10-18 21:26:58 +02:00
|
|
|
package net.md_5.bungee.netty;
|
|
|
|
|
|
|
|
import com.google.common.base.Preconditions;
|
|
|
|
+
|
|
|
|
+import dev._2lstudios.flamecord.FlameCord;
|
|
|
|
import io.github.waterfallmc.waterfall.event.ConnectionInitEvent;
|
|
|
|
import io.netty.buffer.PooledByteBufAllocator;
|
|
|
|
import io.netty.channel.Channel;
|
|
|
|
--
|
2022-06-08 01:38:15 +02:00
|
|
|
2.34.1
|
2020-10-18 21:26:58 +02:00
|
|
|
|