Message de connexion (en français) seulement après le /login
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user