Move AbstractReconnectManager to the API and rename to AbstractReconnectHandler.

This commit is contained in:
md_5 2013-09-16 08:21:53 +10:00
parent 38a8469ab4
commit 5ed5c71aea
3 changed files with 7 additions and 8 deletions

View File

@ -1,13 +1,11 @@
package net.md_5.bungee.reconnect; package net.md_5.bungee.api;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.ReconnectHandler;
import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.PendingConnection; import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
public abstract class AbstractReconnectManager implements ReconnectHandler public abstract class AbstractReconnectHandler implements ReconnectHandler
{ {
@Override @Override

View File

@ -51,7 +51,7 @@ import net.md_5.bungee.protocol.packet.PacketFCEncryptionResponse;
import net.md_5.bungee.protocol.packet.PacketFDEncryptionRequest; import net.md_5.bungee.protocol.packet.PacketFDEncryptionRequest;
import net.md_5.bungee.protocol.packet.PacketFEPing; import net.md_5.bungee.protocol.packet.PacketFEPing;
import net.md_5.bungee.protocol.packet.PacketFFKick; import net.md_5.bungee.protocol.packet.PacketFFKick;
import net.md_5.bungee.reconnect.AbstractReconnectManager; import net.md_5.bungee.api.AbstractReconnectHandler;
@RequiredArgsConstructor @RequiredArgsConstructor
public class InitialHandler extends PacketHandler implements PendingConnection public class InitialHandler extends PacketHandler implements PendingConnection
@ -133,7 +133,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
private void respondToPing() private void respondToPing()
{ {
ServerInfo forced = AbstractReconnectManager.getForcedHost( this ); ServerInfo forced = AbstractReconnectHandler.getForcedHost( this );
final String motd = ( forced != null ) ? forced.getMotd() : listener.getMotd(); final String motd = ( forced != null ) ? forced.getMotd() : listener.getMotd();
Callback<ServerPing> pingBack = new Callback<ServerPing>() Callback<ServerPing> pingBack = new Callback<ServerPing>()
@ -354,7 +354,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
server = bungee.getReconnectHandler().getServer( userCon ); server = bungee.getReconnectHandler().getServer( userCon );
} else } else
{ {
server = AbstractReconnectManager.getForcedHost( this ); server = AbstractReconnectHandler.getForcedHost( this );
} }
userCon.connect( server, true ); userCon.connect( server, true );

View File

@ -1,5 +1,6 @@
package net.md_5.bungee.reconnect; package net.md_5.bungee.reconnect;
import net.md_5.bungee.api.AbstractReconnectHandler;
import java.io.File; import java.io.File;
import java.io.FileReader; import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
@ -16,7 +17,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.error.YAMLException; import org.yaml.snakeyaml.error.YAMLException;
public class YamlReconnectHandler extends AbstractReconnectManager public class YamlReconnectHandler extends AbstractReconnectHandler
{ {
private final Yaml yaml = new Yaml(); private final Yaml yaml = new Yaml();