Small code / api cleanup. Need to fix kicking in general, especially in ServerConnector before release.
This commit is contained in:
parent
2e33ab1460
commit
76319371f7
@ -30,14 +30,6 @@ public interface PendingConnection extends Connection
|
||||
*/
|
||||
public InetSocketAddress getVirtualHost();
|
||||
|
||||
/**
|
||||
* Completely kick this user from the proxy and all of its child
|
||||
* connections.
|
||||
*
|
||||
* @param reason the disconnect reason displayed to the player
|
||||
*/
|
||||
public void disconnect(String reason);
|
||||
|
||||
/**
|
||||
* Get the listener that accepted this connection.
|
||||
*
|
||||
|
@ -48,13 +48,6 @@ public interface ProxiedPlayer extends Connection, CommandSender
|
||||
*/
|
||||
public int getPing();
|
||||
|
||||
/**
|
||||
* Disconnect (remove) this player from the proxy with the specified reason.
|
||||
*
|
||||
* @param reason the reason displayed to the player
|
||||
*/
|
||||
public void disconnect(String reason);
|
||||
|
||||
/**
|
||||
* Send a plugin message to this player.
|
||||
*
|
||||
|
@ -3,7 +3,6 @@ package net.md_5.bungee;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.Formatter;
|
||||
@ -21,7 +20,7 @@ public class Logger extends java.util.logging.Logger
|
||||
|
||||
public Logger()
|
||||
{
|
||||
super( "RubberBand", null );
|
||||
super( "BungeeCord", null );
|
||||
try
|
||||
{
|
||||
FileHandler handler = new FileHandler( "proxy.log", 1 << 14, 1, true );
|
||||
|
@ -1,8 +1,6 @@
|
||||
package net.md_5.bungee;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.Getter;
|
||||
|
@ -23,7 +23,6 @@ import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import net.md_5.bungee.api.connection.PendingConnection;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||
import net.md_5.bungee.api.event.ServerConnectEvent;
|
||||
import net.md_5.bungee.netty.HandlerBoss;
|
||||
import net.md_5.bungee.netty.PipelineUtils;
|
||||
|
@ -184,9 +184,9 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
ch.pipeline().addBefore( "decoder", "cipher", new CipherCodec( encrypt, decrypt ) );
|
||||
|
||||
thisState = InitialHandler.State.LOGIN;
|
||||
} catch ( Exception ex )
|
||||
} catch ( Throwable t )
|
||||
{
|
||||
disconnect( "[Report to md_5 / Server Owner] " + Util.exception( ex ) );
|
||||
disconnect( "[Report to md_5 / Server Owner] " + Util.exception( t ) );
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
|
@ -1,13 +1,10 @@
|
||||
package net.md_5.bungee.netty;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelConfig;
|
||||
import io.netty.channel.ChannelException;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.ChannelOutboundMessageHandlerAdapter;
|
||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||
import io.netty.util.AttributeKey;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
Loading…
Reference in New Issue
Block a user