package org.mcphoton.server;

import java.awt.image.BufferedImage;
import java.net.InetSocketAddress;
import org.mcphoton.utils.Location;

/**
 * Represents the server's configuration.
 *
 * @author TheElectronWill
 */
public interface ServerConfiguration {

	/**
	 * @return the message of the day.
	 */
	String getMOTD();

	/**
	 * Sets the motd.
	 *
	 * @param motd the message of the day.
	 */
	void setMOTD(String motd);

	/**
	 * @return the maximum number of players that can connected to the server.
	 */
	int getMaxPlayers();

	/**
	 * Sets the maximum number of players that can be connected to the server.
	 *
	 * @param maxPlayers the max number of connected players.
	 */
	void setMaxPlayers(int maxPlayers);

	/**
	 * @return the server's address.
	 */
	InetSocketAddress getAddress();

	/**
	 * Sets the server's address.
	 *
	 * @param address the server's address.
	 */
	void setAddress(InetSocketAddress address);

	/**
	 * @return the server's icon.
	 */
	BufferedImage getIcon();

	/**
	 * Sets the server's icon.
	 *
	 * @param icon the icon to set.
	 */
	void setIcon(BufferedImage icon);

	/**
	 * @return the spawn location.
	 */
	Location getSpawnLocation();

	/**
	 * Sets the spawn location.
	 *
	 * @param location the spawn location to set.
	 */
	void setSpawnLocation(Location location);

	/**
	 * Checks if this server is in online mode.
	 *
	 * @return {@code true} if it is in online mode, {@code false} if it isn't.
	 */
	boolean isOnlineMode();

	/**
	 * Sets if this server is in online mode or not.
	 *
	 * @param online {@code true} if it is in online mode, {@code false} if it isn't.
	 */
	void setOnlineMode(boolean online);

}

@@ -750,96 +750,84 @@
 r's 
-address.%0A%09 */%0A%09InetSocketAddress getAddress();%0A%0A%09/**%0A%09 * Sets the server's address
+port%0A%09 */%0A%09int getPort();%0A%0A%09/**%0A%09 * Sets the local port used by the server
 .%0A
-%09 *%0A
 %09 * 
@@ -833,23 +833,20 @@
  @param 
-address
+port
  the ser
@@ -851,23 +851,20 @@
 erver's 
-address
+port
 .%0A%09 */%0A%09
@@ -875,41 +875,21 @@
  set
-Address(InetSocketAddress address
+Port(int port
 );%0A%0A

Store the port in the config instead of the entire address