Add option to force default server
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 md_5
					md_5