parent
14371a1a8c
commit
8e390b5714
@ -255,11 +255,16 @@ public final class UserConnection implements ProxiedPlayer
|
||||
|
||||
@Override
|
||||
public synchronized void disconnect(String reason)
|
||||
{
|
||||
disconnect0( Util.stupify( reason ) );
|
||||
}
|
||||
|
||||
public synchronized void disconnect0(String reason)
|
||||
{
|
||||
if ( ch.getHandle().isActive() )
|
||||
{
|
||||
bungee.getLogger().log( Level.INFO, "[" + getName() + "] disconnected with: " + reason );
|
||||
unsafe().sendPacket( new Kick( Util.stupify( reason ) ) );
|
||||
unsafe().sendPacket( new Kick(reason) );
|
||||
ch.close();
|
||||
if ( server != null )
|
||||
{
|
||||
|
@ -342,7 +342,7 @@ public class DownstreamBridge extends PacketHandler
|
||||
con.connectNow( event.getCancelServer() );
|
||||
} else
|
||||
{
|
||||
con.disconnect( bungee.getTranslation( "server_kick" ) + event.getKickReason() );
|
||||
con.disconnect0( "[" + Util.stupify( bungee.getTranslation( "server_kick" ) ) + "," + event.getKickReason() + "]" ); // TODO: Json concat util method
|
||||
}
|
||||
server.setObsolete( true );
|
||||
throw new CancelSendSignal();
|
||||
|
Loading…
Reference in New Issue
Block a user