mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-09-10 05:08:04 +02: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 boolean metricsEnabled = true;
|
||||
public boolean forceDefaultServer = false;
|
||||
|
||||
/**
|
||||
* 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);
|
||||
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;
|
||||
case 0xFE:
|
||||
socket.setSoTimeout(100);
|
||||
|
Loading…
Reference in New Issue
Block a user