mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 02:24:58 +00:00
Cleaned it up a bit as suggested by @jeromsar
This commit is contained in:
parent
6f6fdb28bf
commit
7fe0b562ee
2 changed files with 8 additions and 14 deletions
|
@ -1,3 +1,3 @@
|
|||
#Build Number for ANT. Do not edit!
|
||||
#Sat Nov 01 19:44:24 GMT 2014
|
||||
build.number=963
|
||||
#Sat Nov 01 19:54:24 GMT 2014
|
||||
build.number=964
|
||||
|
|
|
@ -856,21 +856,15 @@ public class TFM_PlayerListener implements Listener
|
|||
{
|
||||
TFM_ServerInterface.handlePlayerLogin(event);
|
||||
|
||||
// Force IP Setup
|
||||
// Force IP Setup
|
||||
if(TFM_ConfigEntry.FORCE_IP_ENABLED.getBoolean())
|
||||
{
|
||||
if(!event.getHostname().equalsIgnoreCase(TFM_ConfigEntry.SERVER_ADDRESS.getString() + ":" + TFM_ConfigEntry.SERVER_PORT.getInteger()))
|
||||
{
|
||||
if (TFM_ConfigEntry.SERVER_PORT.getInteger() != DEFAULT_PORT)
|
||||
{
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, TFM_ConfigEntry.FORCE_IP_KICKMSG.getString().replace("%address%", TFM_ConfigEntry.SERVER_ADDRESS.getString()) + ":" + TFM_ConfigEntry.SERVER_PORT.getInteger());
|
||||
}
|
||||
else
|
||||
{
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, TFM_ConfigEntry.FORCE_IP_KICKMSG.getString().replace("%address%", TFM_ConfigEntry.SERVER_ADDRESS.getString()));
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
final int port = TFM_ConfigEntry.SERVER_PORT.getInteger();
|
||||
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, TFM_ConfigEntry.FORCE_IP_KICKMSG.getString().replace("%address%", TFM_ConfigEntry.SERVER_ADDRESS.getString()) + (port == DEFAULT_PORT ? "" : ":" + port));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue