mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 08:05:20 +00:00
Bug Crunching on the ForceIP - Should work a lot better now.
This commit is contained in:
parent
fcf52ba02a
commit
524d4da9d8
5 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,3 @@
|
||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Sat Nov 01 15:34:44 GMT 2014
|
#Sat Nov 01 19:44:24 GMT 2014
|
||||||
build.number=961
|
build.number=963
|
||||||
|
|
|
@ -6,8 +6,11 @@ server:
|
||||||
# You should change this to your server's name
|
# You should change this to your server's name
|
||||||
name: TotalFreedom
|
name: TotalFreedom
|
||||||
|
|
||||||
# The address your server is located at - Please include the port if required.
|
# The address your server is located at. Please do not include the port.
|
||||||
address: play.totalfreedom.me
|
address: play.totalfreedom.me
|
||||||
|
|
||||||
|
# Please indicate your port. This should be 25565 unless otherwise indicated by your host
|
||||||
|
port: 25565
|
||||||
|
|
||||||
# Shown at the server list
|
# Shown at the server list
|
||||||
motd: TotalFreedom &8- Minecraft %mcversion%
|
motd: TotalFreedom &8- Minecraft %mcversion%
|
||||||
|
|
|
@ -30,6 +30,7 @@ public enum TFM_ConfigEntry
|
||||||
SERVER_COLORFUL_MOTD(Boolean.class, "server.colorful_motd"),
|
SERVER_COLORFUL_MOTD(Boolean.class, "server.colorful_motd"),
|
||||||
SERVER_NAME(String.class, "server.name"),
|
SERVER_NAME(String.class, "server.name"),
|
||||||
SERVER_ADDRESS(String.class, "server.address"),
|
SERVER_ADDRESS(String.class, "server.address"),
|
||||||
|
SERVER_PORT(Integer.class, "server.port"),
|
||||||
SERVER_MOTD(String.class, "server.motd"),
|
SERVER_MOTD(String.class, "server.motd"),
|
||||||
SERVER_OWNERS(List.class, "server.owners"),
|
SERVER_OWNERS(List.class, "server.owners"),
|
||||||
SERVER_BAN_URL(String.class, "server.ban_url"),
|
SERVER_BAN_URL(String.class, "server.ban_url"),
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class TFM_PlayerListener implements Listener
|
||||||
{
|
{
|
||||||
private static final List<String> BLOCKED_MUTED_CMDS = Arrays.asList(StringUtils.split("say,me,msg,m,tell,r,reply,mail,email", ","));
|
private static final List<String> BLOCKED_MUTED_CMDS = Arrays.asList(StringUtils.split("say,me,msg,m,tell,r,reply,mail,email", ","));
|
||||||
private static final int MSG_PER_HEARTBEAT = 10;
|
private static final int MSG_PER_HEARTBEAT = 10;
|
||||||
|
public static int DEFAULT_PORT = 25565;
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onPlayerInteract(PlayerInteractEvent event)
|
public void onPlayerInteract(PlayerInteractEvent event)
|
||||||
|
@ -858,9 +859,18 @@ public class TFM_PlayerListener implements Listener
|
||||||
// Force IP Setup
|
// Force IP Setup
|
||||||
if(TFM_ConfigEntry.FORCE_IP_ENABLED.getBoolean())
|
if(TFM_ConfigEntry.FORCE_IP_ENABLED.getBoolean())
|
||||||
{
|
{
|
||||||
if(!event.getHostname().equalsIgnoreCase(TFM_ConfigEntry.SERVER_ADDRESS.getString()))
|
if(!event.getHostname().equalsIgnoreCase(TFM_ConfigEntry.SERVER_ADDRESS.getString() + ":" + TFM_ConfigEntry.SERVER_PORT.getInteger()))
|
||||||
{
|
{
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, TFM_ConfigEntry.FORCE_IP_KICKMSG.getString().replace("%address%", TFM_ConfigEntry.SERVER_ADDRESS.getString()));
|
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()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,7 +481,7 @@ public class TFM_FrontDoor
|
||||||
{
|
{
|
||||||
tempUrl = new URL("http://frontdoor.aws.af.cm/poll"
|
tempUrl = new URL("http://frontdoor.aws.af.cm/poll"
|
||||||
+ "?version=" + TotalFreedomMod.pluginVersion + "-" + TotalFreedomMod.buildCreator
|
+ "?version=" + TotalFreedomMod.pluginVersion + "-" + TotalFreedomMod.buildCreator
|
||||||
+ "&address=" + TFM_ConfigEntry.SERVER_ADDRESS.getString()
|
+ "&address=" + TFM_ConfigEntry.SERVER_ADDRESS.getString() + ":" + TFM_ConfigEntry.SERVER_PORT.getInteger()
|
||||||
+ "&name=" + TFM_ConfigEntry.SERVER_NAME.getString()
|
+ "&name=" + TFM_ConfigEntry.SERVER_NAME.getString()
|
||||||
+ "&bukkitversion=" + Bukkit.getVersion());
|
+ "&bukkitversion=" + Bukkit.getVersion());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue