Compare commits
6 Commits
86c33c78cb
...
2736daf6ee
Author | SHA1 | Date |
---|---|---|
Thorben | 2736daf6ee | |
Shane Freeder | 1231b4d27c | |
Thorben | e4502f3bc2 | |
thsassmann | 9793edf2b1 | |
thsassmann | b1178d0e14 | |
thsassmann | 2c62f12815 |
|
@ -1 +1 @@
|
|||
Subproject commit 336333acb1e6140556271545c71f784083559dcc
|
||||
Subproject commit 6e1751733f6b3dafe824dcd7f00d5ed86572ba37
|
|
@ -1,14 +1,14 @@
|
|||
From 76c901d6879fc774867b51da71abb31c10bdc8ab Mon Sep 17 00:00:00 2001
|
||||
From 46bb2e2fc11e4133b45c1c6af6e1e5d20043f9f1 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 19 Jun 2022 10:31:51 +0100
|
||||
Subject: [PATCH] Expand packet-decode-logging usage
|
||||
|
||||
|
||||
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
|
||||
index 206f4227..954ffbc9 100644
|
||||
index 6caf30cd..75e802d2 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
||||
@@ -152,6 +152,14 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||
@@ -155,6 +155,14 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} - read timed out", handler );
|
||||
} else if ( cause instanceof DecoderException )
|
||||
{
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
From 434ea68cc47b1b044c12ab15ed1385b8f0d45317 Mon Sep 17 00:00:00 2001
|
||||
From: thsassmann <thorben@sassmann.nrw>
|
||||
Date: Sun, 10 Dec 2023 14:10:21 +0100
|
||||
Subject: [PATCH] Added ProxyInitializeEvent
|
||||
|
||||
|
||||
diff --git a/api/src/main/java/io/github/waterfallmc/waterfall/event/ProxyInitializeEvent.java b/api/src/main/java/io/github/waterfallmc/waterfall/event/ProxyInitializeEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..a1af4806
|
||||
--- /dev/null
|
||||
+++ b/api/src/main/java/io/github/waterfallmc/waterfall/event/ProxyInitializeEvent.java
|
||||
@@ -0,0 +1,37 @@
|
||||
+package io.github.waterfallmc.waterfall.event;
|
||||
+
|
||||
+
|
||||
+import lombok.Data;
|
||||
+import lombok.EqualsAndHashCode;
|
||||
+import lombok.ToString;
|
||||
+import net.md_5.bungee.api.plugin.Event;
|
||||
+
|
||||
+/**
|
||||
+ * This event is posted when the proxy has completed the startup procedure.<br>
|
||||
+ * Even if the event is posted, the proxy may be <b>NOT</b> able to accept any connections.<br>
|
||||
+ * See the {@link ProxyInitializeEvent#isSuccess} method for the actual state.
|
||||
+ */
|
||||
+@Data
|
||||
+@ToString(callSuper = false)
|
||||
+@EqualsAndHashCode(callSuper = false)
|
||||
+public class ProxyInitializeEvent extends Event {
|
||||
+
|
||||
+ private final boolean isSuccess;
|
||||
+
|
||||
+ /**
|
||||
+ * Constructor
|
||||
+ * @param isSuccess Is Proxy listening?
|
||||
+ */
|
||||
+ public ProxyInitializeEvent(boolean isSuccess) {
|
||||
+ super();
|
||||
+ this.isSuccess = isSuccess;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns if the startup is a success or not.
|
||||
+ * @return {@code true} if the Proxy is ready.
|
||||
+ */
|
||||
+ public boolean isSuccess() {
|
||||
+ return isSuccess;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
index 01c8a172..abf5d0c8 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
@@ -11,6 +11,7 @@ import com.google.gson.GsonBuilder;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import io.github.waterfallmc.waterfall.conf.WaterfallConfiguration;
|
||||
import io.github.waterfallmc.waterfall.event.ProxyExceptionEvent;
|
||||
+import io.github.waterfallmc.waterfall.event.ProxyInitializeEvent;
|
||||
import io.github.waterfallmc.waterfall.exception.ProxyPluginEnableDisableException;
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.Channel;
|
||||
@@ -23,7 +24,6 @@ import io.netty.util.ResourceLeakDetector;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
-import java.io.PrintStream;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -347,6 +347,7 @@ public class BungeeCord extends ProxyServer
|
||||
@Override
|
||||
public void operationComplete(ChannelFuture future) throws Exception
|
||||
{
|
||||
+ getPluginManager().callEvent(new ProxyInitializeEvent(future.isSuccess()));
|
||||
if ( future.isSuccess() )
|
||||
{
|
||||
listeners.add( future.channel() );
|
||||
--
|
||||
2.43.0
|
||||
|
Loading…
Reference in New Issue