mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 11:15:47 +01:00
Add option to force default server
This commit is contained in:
parent
73bc6561f2
commit
d622041d45
@ -133,6 +133,7 @@ public class Configuration
|
|||||||
*/
|
*/
|
||||||
public String statsUuid = UUID.randomUUID().toString();
|
public String statsUuid = UUID.randomUUID().toString();
|
||||||
public boolean metricsEnabled = true;
|
public boolean metricsEnabled = true;
|
||||||
|
public boolean forceDefaultServer = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the configuration and save default values.
|
* Load the configuration and save default values.
|
||||||
|
@ -77,7 +77,8 @@ public class InitialHandler implements Runnable
|
|||||||
}
|
}
|
||||||
|
|
||||||
UserConnection userCon = new UserConnection(socket, in, out, handshake, customPackets);
|
UserConnection userCon = new UserConnection(socket, in, out, handshake, customPackets);
|
||||||
userCon.connect(BungeeCord.instance.config.getServer(handshake.username, handshake.host));
|
String server = (BungeeCord.instance.config.forceDefaultServer) ? BungeeCord.instance.config.defaultServerName : BungeeCord.instance.config.getServer(handshake.username, handshake.host);
|
||||||
|
userCon.connect(server);
|
||||||
break;
|
break;
|
||||||
case 0xFE:
|
case 0xFE:
|
||||||
socket.setSoTimeout(100);
|
socket.setSoTimeout(100);
|
||||||
|
Loading…
Reference in New Issue
Block a user