#2498: Add ServerConnectRequest accessor in ServerConnectEvent.

- Make the timeout and retry status mutable so plugins can modify these values directly within the ServerConnectEvent.
This commit is contained in:
Mystiflow
2020-02-03 10:36:33 +11:00
committed by md_5
parent b4b998b2e5
commit cdacc0b1be
3 changed files with 22 additions and 4 deletions

View File

@@ -274,7 +274,7 @@ public final class UserConnection implements ProxiedPlayer
Preconditions.checkNotNull( request, "request" );
final Callback<ServerConnectRequest.Result> callback = request.getCallback();
ServerConnectEvent event = new ServerConnectEvent( this, request.getTarget(), request.getReason() );
ServerConnectEvent event = new ServerConnectEvent( this, request.getTarget(), request.getReason(), request );
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
{
if ( callback != null )