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

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Fri Oct 31 17:39:33 GMT 2014
build.number=959
#Sat Nov 01 12:07:03 GMT 2014
build.number=960

View file

@ -6,7 +6,7 @@ server:
# You should change this to your server's name
name: TotalFreedom
# The address your server is located at
# The address your server is located at - Please Note: The port MUST be included, even if it is default port (DNS Records included)
address: 64.34.165.5:28965
# Shown at the server list
@ -25,12 +25,6 @@ server:
# URL players should appeal for permanent bans at
permban_url: http://bit.ly/TF_PermBan
# Your Servers Host Name - This can be your servers's IP or your servers DNS Record. Please ensure its what you want players to use to connect using.
hostname: play.totalfreedom.me
# Server Port - If your using a domain SRV record (eg play.totalfreedom.me) this MUST be 25565 else use the port you need to type at the end of the address.
port: 25565
# ForceIP Configuration
forceip:

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());
}