Add handler for me.StevenLawson.BukkitTelnet.TelnetPreLoginEvent

This commit is contained in:
StevenLawson 2013-09-27 10:26:59 -04:00
parent 9f889efa76
commit 81995f38a1
3 changed files with 21 additions and 1 deletions

View File

@ -51,7 +51,8 @@ javac.classpath=\
${libs.CraftBukkit.classpath}:\ ${libs.CraftBukkit.classpath}:\
${libs.WorldEdit.classpath}:\ ${libs.WorldEdit.classpath}:\
${libs.DisguiseCraft.classpath}:\ ${libs.DisguiseCraft.classpath}:\
${libs.Essentials.classpath} ${libs.Essentials.classpath}:\
${libs.BukkitTelnet.classpath}
# Space-separated list of extra javac options # Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.deprecation=false javac.deprecation=false

View File

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

View File

@ -308,6 +308,7 @@ public class TotalFreedomMod extends JavaPlugin
pm.registerEvents(new TFM_PlayerListener(), plugin); pm.registerEvents(new TFM_PlayerListener(), plugin);
pm.registerEvents(new TFM_WeatherListener(), plugin); pm.registerEvents(new TFM_WeatherListener(), plugin);
pm.registerEvents(new TFM_ServerListener(), plugin); pm.registerEvents(new TFM_ServerListener(), plugin);
pm.registerEvents(new TFM_CustomListener(), plugin);
} }
private static void setAppProperties() private static void setAppProperties()