private boolean ipForward;
private Favicon favicon;
public void load()
{
ConfigurationAdapter adapter = ProxyServer.getInstance().getConfigurationAdapter();
adapter.load();
File fav = new File( "server-icon.png" );
if ( fav.exists() )
{
try
{
favicon = Favicon.create( ImageIO.read( fav ) );
} catch ( IOException | IllegalArgumentException ex )
{
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Could not load server icon", ex );
}
}
listeners = adapter.getListeners();
timeout = adapter.getInt( "timeout", timeout );
uuid = adapter.getString( "stats", uuid );
onlineMode = adapter.getBoolean( "online_mode", onlineMode );
playerLimit = adapter.getInt( "player_limit", playerLimit );
throttle = adapter.getInt( "connection_throttle", throttle );
ipForward = adapter.getBoolean( "ip_forward", ipForward );
disabledCommands = new CaseInsensitiveSet( (Collection<String>) adapter.getList( "disabled_commands", Arrays.asList( "disabledcommandhere" ) ) );
Preconditions.checkArgument( listeners != null && !listeners.isEmpty(), "No listeners defined." );
Map<String, ServerInfo> newServers = adapter.getServers();
Preconditions.checkArgument( newServers != null && !newServers.isEmpty(), "No servers defined" );
if ( servers == null )
{
servers = new CaseInsensitiveMap<>( newServers );