Removed Hostname and Port from the config - Now using the server address.

This commit is contained in:
Ryan
2014-11-01 12:10:08 +00:00
parent 2a71be4050
commit 99043a7c49
4 changed files with 4 additions and 12 deletions

View File

@ -34,8 +34,6 @@ public enum TFM_ConfigEntry
SERVER_OWNERS(List.class, "server.owners"),
SERVER_BAN_URL(String.class, "server.ban_url"),
SERVER_PERMBAN_URL(String.class, "server.permban_url"),
SERVER_HOSTNAME(String.class, "server.hostname"),
SERVER_PORT(Integer.class, "server.port"),
//
TWITTERBOT_ENABLED(Boolean.class, "twitterbot.enabled"),
TWITTERBOT_SECRET(String.class, "twitterbot.secret"),

View File

@ -858,7 +858,7 @@ public class TFM_PlayerListener implements Listener
// Force IP Setup
if(TFM_ConfigEntry.FORCE_IP_ENABLED.getBoolean())
{
if(!event.getHostname().equalsIgnoreCase(TFM_ConfigEntry.SERVER_HOSTNAME.getString() + ":" + TFM_ConfigEntry.SERVER_PORT.getInteger()))
if(!event.getHostname().equalsIgnoreCase(TFM_ConfigEntry.SERVER_ADDRESS.getString()))
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, TFM_ConfigEntry.FORCE_IP_KICKMSG.getString());
}