Partially support forced_hosts MOTD without SRV records - gonna think how best to put this in the config, for now its server: motd:, might remove listener motd later on

This commit is contained in:
md_5
2013-07-01 14:05:57 +10:00
parent 8732904bfd
commit 632fa8bd94
8 changed files with 89 additions and 26 deletions

View File

@@ -189,10 +189,11 @@ public abstract class ProxyServer
*
* @param name name of the server
* @param address connectable Minecraft address + port of the server
* @param motd the motd when used as a forced server
* @param restricted whether the server info restricted property will be set
* @return the constructed instance
*/
public abstract ServerInfo constructServerInfo(String name, InetSocketAddress address, boolean restricted);
public abstract ServerInfo constructServerInfo(String name, InetSocketAddress address, String motd, boolean restricted);
/**
* Returns the console overlord for this proxy. Being the console, this

View File

@@ -36,6 +36,13 @@ public interface ServerInfo
*/
Collection<ProxiedPlayer> getPlayers();
/**
* Returns the MOTD which should be used when this server is a forced host.
*
* @return the motd
*/
String getMotd();
/**
* Whether the player can access this server. It will only return false when
* the player has no permission and this server is restricted.