mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-28 05:05:21 +01:00
Move AbstractReconnectManager to the API and rename to AbstractReconnectHandler.
This commit is contained in:
parent
38a8469ab4
commit
5ed5c71aea
@ -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
|
@ -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 );
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user