private void updateConfig(ButtonEvent event) {
		for (OptionsField field : gui.getOptionsMenu().getOptionFields())
			switch (field.getOption()) {
			case HOSTNAME:
				setHostname(field.submit());
				break;
			case PORT:
				setPort(field.submit());
				break;
			case NICKNAME:
				setNick(field.submit());
				break;
			}
	}