@Override @SuppressWarnings("unchecked") public Map<String, ServerInfo> getServers() { Map<String, Map<String, Object>> base = get( "servers", (Map) Collections.singletonMap( "lobby", new HashMap<>() ) ); Map<String, ServerInfo> ret = new HashMap<>(); for ( Map.Entry<String, Map<String, Object>> entry : base.entrySet() ) { Map<String, Object> val = entry.getValue(); String name = entry.getKey(); String addr = get( "address", "localhost:25565", val ); String motd = ChatColor.translateAlternateColorCodes( '&', get( "motd", "&1Just another BungeeCord - Forced Host", val ) ); boolean restricted = get( "restricted", false, val ); InetSocketAddress address = Util.getAddr( addr ); ServerInfo info = ProxyServer.getInstance().constructServerInfo( name, address, motd, restricted ); ret.put( name, info ); } return ret; }
String host = get( "host", "0.0.0.0:25577", val ); int tabListSize = get( "tab_size", 60, val ); InetSocketAddress address = Util.getAddr( host ); Map<String, String> forced = new CaseInsensitiveMap<>( get( "forced_hosts", forcedDef, val ) ); String tabListName = get( "tab_list", "GLOBAL_PING", val );
@Override @SuppressWarnings("unchecked") public Map<String, ServerInfo> getServers() { Map<String, Map<String, Object>> base = get( "servers", (Map) Collections.singletonMap( "lobby", new HashMap<>() ) ); Map<String, ServerInfo> ret = new HashMap<>(); for ( Map.Entry<String, Map<String, Object>> entry : base.entrySet() ) { Map<String, Object> val = entry.getValue(); String name = entry.getKey(); String addr = get( "address", "localhost:25565", val ); String motd = ChatColor.translateAlternateColorCodes( '&', get( "motd", "&1Just another Waterfall - Forced Host", val ) ); boolean restricted = get( "restricted", false, val ); InetSocketAddress address = Util.getAddr( addr ); ServerInfo info = ProxyServer.getInstance().constructServerInfo( name, address, motd, restricted ); ret.put( name, info ); } return ret; }
String host = get( "host", "0.0.0.0:25577", val ); int tabListSize = get( "tab_size", 60, val ); InetSocketAddress address = Util.getAddr( host ); Map<String, String> forced = new CaseInsensitiveMap<>( get( "forced_hosts", forcedDef, val ) ); String tabListName = get( "tab_list", "GLOBAL_PING", val );