mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Add handler for me.StevenLawson.BukkitTelnet.TelnetPreLoginEvent
This commit is contained in:
parent
9f889efa76
commit
81995f38a1
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user