mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-12-01 06:33:39 +01:00
Merge upstream. Closes #99
This commit is contained in:
parent
d2d44264d2
commit
0366c3751a
@ -1 +1 @@
|
|||||||
Subproject commit 18f57f24fa66eb31b16d7032501f3e7f342fe180
|
Subproject commit 1ad81564adfb7e0ede2c2a13eab547158d29fadb
|
@ -1,4 +1,4 @@
|
|||||||
From 483145139612689403eb244cb41f65540ae7dfa5 Mon Sep 17 00:00:00 2001
|
From 7a19a478b89b6df8cc345ea44cfc75d119a67565 Mon Sep 17 00:00:00 2001
|
||||||
From: Janmm14 <computerjanimaus@yahoo.de>
|
From: Janmm14 <computerjanimaus@yahoo.de>
|
||||||
Date: Sat, 12 Dec 2015 23:43:30 +0100
|
Date: Sat, 12 Dec 2015 23:43:30 +0100
|
||||||
Subject: [PATCH] Optional server list ping logging.
|
Subject: [PATCH] Optional server list ping logging.
|
||||||
@ -74,10 +74,10 @@ index ed057b8..a37f3ea 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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
|
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 cd680f5..c4d8d81 100644
|
index c0a5061..4768cb4 100644
|
||||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||||
@@ -514,6 +514,6 @@ public class DownstreamBridge extends PacketHandler
|
@@ -510,6 +510,6 @@ public class DownstreamBridge extends PacketHandler
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
@ -135,5 +135,5 @@ index 4669dee..417b2f7 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.7.4 (Apple Git-66)
|
2.10.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3a069cb77d6b3414b201d2152e729f7d87d43227 Mon Sep 17 00:00:00 2001
|
From 9f641cadaeec788313843c830cc4c2643b183316 Mon Sep 17 00:00:00 2001
|
||||||
From: Nathan Poirier <nathan@poirier.io>
|
From: Nathan Poirier <nathan@poirier.io>
|
||||||
Date: Tue, 28 Jun 2016 23:00:49 -0500
|
Date: Tue, 28 Jun 2016 23:00:49 -0500
|
||||||
Subject: [PATCH] Improve ServerKickEvent
|
Subject: [PATCH] Improve ServerKickEvent
|
||||||
@ -75,17 +75,16 @@ index a37f3ea..5d72a56 100644
|
|||||||
{
|
{
|
||||||
// Pre cancel the event if we are going to try another server
|
// Pre cancel the event if we are going to try another server
|
||||||
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
|
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 c4d8d81..2a1a719 100644
|
index 4768cb4..356cf4f 100644
|
||||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||||
@@ -60,16 +60,19 @@ public class DownstreamBridge extends PacketHandler
|
@@ -60,16 +60,19 @@ public class DownstreamBridge extends PacketHandler
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- ServerInfo def = bungee.getServerInfo( con.getPendingConnection().getListener().getFallbackServer() );
|
|
||||||
- if ( server.getInfo() != def )
|
|
||||||
+ // Waterfall start
|
+ // Waterfall start
|
||||||
+ ServerInfo def = con.updateAndGetNextServer( server.getInfo() );
|
ServerInfo def = con.updateAndGetNextServer( server.getInfo() );
|
||||||
|
- if ( def != null )
|
||||||
+ ServerKickEvent event = bungee.getPluginManager().callEvent( new ServerKickEvent( con, server.getInfo(), TextComponent.fromLegacyText( bungee.getTranslation( "server_went_down" ) ), def, ServerKickEvent.State.CONNECTED, ServerKickEvent.Cause.EXCEPTION ) );
|
+ ServerKickEvent event = bungee.getPluginManager().callEvent( new ServerKickEvent( con, server.getInfo(), TextComponent.fromLegacyText( bungee.getTranslation( "server_went_down" ) ), def, ServerKickEvent.State.CONNECTED, ServerKickEvent.Cause.EXCEPTION ) );
|
||||||
+ if ( event.isCancelled() && event.getCancelServer() != null )
|
+ if ( event.isCancelled() && event.getCancelServer() != null )
|
||||||
{
|
{
|
||||||
@ -125,11 +124,15 @@ index c4d8d81..2a1a719 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
ServerDisconnectEvent serverDisconnectEvent = new ServerDisconnectEvent( con, server.getInfo() );
|
ServerDisconnectEvent serverDisconnectEvent = new ServerDisconnectEvent( con, server.getInfo() );
|
||||||
@@ -458,7 +473,7 @@ public class DownstreamBridge extends PacketHandler
|
@@ -454,7 +469,11 @@ public class DownstreamBridge extends PacketHandler
|
||||||
|
public void handle(Kick kick) throws Exception
|
||||||
{
|
{
|
||||||
def = null;
|
ServerInfo def = con.updateAndGetNextServer( server.getInfo() );
|
||||||
}
|
|
||||||
- ServerKickEvent event = bungee.getPluginManager().callEvent( new ServerKickEvent( con, server.getInfo(), ComponentSerializer.parse( kick.getMessage() ), def, ServerKickEvent.State.CONNECTED ) );
|
- ServerKickEvent event = bungee.getPluginManager().callEvent( new ServerKickEvent( con, server.getInfo(), ComponentSerializer.parse( kick.getMessage() ), def, ServerKickEvent.State.CONNECTED ) );
|
||||||
|
+ if ( Objects.equal( server.getInfo(), def ) )
|
||||||
|
+ {
|
||||||
|
+ def = null;
|
||||||
|
+ }
|
||||||
+ ServerKickEvent event = bungee.getPluginManager().callEvent( new ServerKickEvent( con, server.getInfo(), ComponentSerializer.parse( kick.getMessage() ), def, ServerKickEvent.State.CONNECTED, ServerKickEvent.Cause.SERVER ) ); // Waterfall
|
+ ServerKickEvent event = bungee.getPluginManager().callEvent( new ServerKickEvent( con, server.getInfo(), ComponentSerializer.parse( kick.getMessage() ), def, ServerKickEvent.State.CONNECTED, ServerKickEvent.Cause.SERVER ) ); // Waterfall
|
||||||
if ( event.isCancelled() && event.getCancelServer() != null )
|
if ( event.isCancelled() && event.getCancelServer() != null )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user