diff --git a/nbproject/project.properties b/nbproject/project.properties index c6a3e4ef..1641a7a6 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -51,7 +51,8 @@ javac.classpath=\ ${libs.CraftBukkit.classpath}:\ ${libs.WorldEdit.classpath}:\ ${libs.DisguiseCraft.classpath}:\ - ${libs.Essentials.classpath} + ${libs.Essentials.classpath}:\ + ${libs.BukkitTelnet.classpath} # Space-separated list of extra javac options javac.compilerargs=-Xlint:unchecked -Xlint:deprecation javac.deprecation=false diff --git a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_CustomListener.java b/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_CustomListener.java new file mode 100644 index 00000000..ef1a75e9 --- /dev/null +++ b/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_CustomListener.java @@ -0,0 +1,18 @@ +package me.StevenLawson.TotalFreedomMod.Listener; + +import me.StevenLawson.TotalFreedomMod.TFM_Log; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; + +public class TFM_CustomListener implements Listener +{ + @EventHandler(priority = EventPriority.NORMAL) + public void onTelnetPreLogin(me.StevenLawson.BukkitTelnet.TelnetPreLoginEvent event) + { + String ip = event.getIp(); + String name = event.getName(); + boolean canBypassPassword = event.canBypassPassword(); + TFM_Log.info("Caught TelnetPreLoginEvent: name: " + name + " - ip: " + ip + " - canBypassPassword: " + canBypassPassword); + } +} diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java index 88b7475d..7b561744 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java +++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java @@ -308,6 +308,7 @@ public class TotalFreedomMod extends JavaPlugin pm.registerEvents(new TFM_PlayerListener(), plugin); pm.registerEvents(new TFM_WeatherListener(), plugin); pm.registerEvents(new TFM_ServerListener(), plugin); + pm.registerEvents(new TFM_CustomListener(), plugin); } private static void setAppProperties()