diff --git a/.classpath b/.classpath index 91211c2..e6d2265 100644 --- a/.classpath +++ b/.classpath @@ -8,5 +8,6 @@ + diff --git a/lib/PandacraftAuth.jar b/lib/PandacraftAuth.jar new file mode 100644 index 0000000..8f0c214 Binary files /dev/null and b/lib/PandacraftAuth.jar differ diff --git a/make_jar.jardesc b/make_jar.jardesc index 36822c7..1628ba4 100644 --- a/make_jar.jardesc +++ b/make_jar.jardesc @@ -1,6 +1,6 @@ - + diff --git a/resources/plugin.yml b/resources/plugin.yml index ec8675e..888c19b 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -1,6 +1,6 @@ name: PandacraftUtils main: net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils -version: 2.3 +version: 2.4 diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java index 48bd967..a74c2c2 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java @@ -5,6 +5,7 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.afk.CommandAfk; import net.mc_pandacraft.java.plugin.pandacraftutils.chat_analyzer.ChatAnalysisManager; import net.mc_pandacraft.java.plugin.pandacraftutils.creativ_cheat.CreativCheatManager; import net.mc_pandacraft.java.plugin.pandacraftutils.list.CommandList; +import net.mc_pandacraft.java.plugin.pandacraftutils.login_message.LoginLogoutManager; import net.mc_pandacraft.java.plugin.pandacraftutils.me.CommandMe; import net.mc_pandacraft.java.plugin.pandacraftutils.nopvp_protect.NoPvpProtectManager; import net.mc_pandacraft.java.plugin.pandacraftutils.ping.CommandPing; @@ -33,6 +34,7 @@ public class PandacraftUtils extends JavaPlugin { public ChatAnalysisManager chatAnalysisManager; public CreativCheatManager creativCheatManager; public NoPvpProtectManager noPvpProtectManager; + public LoginLogoutManager loginLogoutManager; public PacketOutServerInfoListener serverPingListener; @@ -56,6 +58,7 @@ public class PandacraftUtils extends JavaPlugin { chatAnalysisManager = new ChatAnalysisManager(this); creativCheatManager = new CreativCheatManager(this); noPvpProtectManager = new NoPvpProtectManager(this); + loginLogoutManager = new LoginLogoutManager(this); serverPingListener = new PacketOutServerInfoListener(this); } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/login_message/LoginLogoutManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/login_message/LoginLogoutManager.java new file mode 100644 index 0000000..c04002a --- /dev/null +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/login_message/LoginLogoutManager.java @@ -0,0 +1,42 @@ +package net.mc_pandacraft.java.plugin.pandacraftutils.login_message; + +import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils; + +import org.bukkit.ChatColor; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerQuitEvent; + +import de.luricos.bukkit.xAuth.events.xAuthLoginEvent; + +public class LoginLogoutManager implements Listener { + + private PandacraftUtils plugin; + + + public LoginLogoutManager(PandacraftUtils pl) { + plugin = pl; + + plugin.getServer().getPluginManager().registerEvents(this, plugin); + } + + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent event) { + event.setJoinMessage(null); + } + + + @EventHandler + public void onxAuthLogin(xAuthLoginEvent event) { + plugin.getServer().broadcastMessage(ChatColor.YELLOW+event.getPlayer().getDisplayName()+ChatColor.YELLOW+" vient de se connecter"); + } + + + @EventHandler + public void onPlayerQuit(PlayerQuitEvent event) { + event.setQuitMessage(ChatColor.YELLOW+event.getPlayer().getDisplayName()+ChatColor.YELLOW+" a quitté le jeu"); + } + +}