From b917f40f6db2d5588d669aa2c2d4c451be6129ef Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sat, 24 Jan 2015 04:05:58 -0500 Subject: [PATCH] Petits correctifs --- .../java/plugin/pandacraftutils/ConfigManager.java | 13 +++++++++++++ .../modules/PacketOutServerInfoListener.java | 5 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/ConfigManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/ConfigManager.java index 4fa173a..b842874 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/ConfigManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/ConfigManager.java @@ -94,6 +94,10 @@ public class ConfigManager { ServerMessages_defaultColor = ChatColor.YELLOW.toString(); ServerMessages_prefix = ChatColor.YELLOW+"["+ChatColor.WHITE+"Pandacraft"+ChatColor.YELLOW+"] "; //configFile.getString("server_messages_prefix"); + + // TODO ajouter les valeurs par défaut dans config.yml + // TODO gérer les codes de coloration; + ServerMOTD = "§7Serveur §fPandacraft§7, §eVenez nous rejoindre :D\n§bCreatif§7, §6Survie§7 et §4Faction/PVP§7 !"; initChatAnalysisBadWord(); initCommandAlias(); @@ -153,6 +157,11 @@ public class ConfigManager { message.put("permissions", "pandacraft.grade.default"); Automessages_messages.add(message); + message = new HashMap(); + message.put("message", "Utilisez la commande &7/cubo"+ServerMessages_defaultColor+" en Survie pour protéger vos construction ! :)"); + message.put("permissions", "*"); + Automessages_messages.add(message); + message = new HashMap(); message.put("message", "WorldEdit disponible en &bCréatif"+ServerMessages_defaultColor+" avec le grade &f[&eUltimate&f]"+ServerMessages_defaultColor+". Profitez en vite :D%n &a http://mc-pandacraft.net/?p=ultimate"); message.put("permissions", "*"); @@ -343,5 +352,9 @@ public class ConfigManager { + public String ServerMOTD; + + + } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java index 63b9de6..ce675e6 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/PacketOutServerInfoListener.java @@ -14,6 +14,7 @@ import com.comphenix.protocol.events.PacketAdapter; import com.comphenix.protocol.events.PacketEvent; import com.comphenix.protocol.wrappers.WrappedGameProfile; +import net.mc_pandacraft.java.plugin.pandacraftutils.ConfigManager; import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils; import net.mc_pandacraft.java.plugin.pandacraftutils.plugin_interface.EssentialsInterface; @@ -107,10 +108,8 @@ public class PacketOutServerInfoListener { event.getPacket().getServerPings().read(0).setPlayersOnline(count_player); - String motd = "§7Serveur §fPandacraft§f, §eVenez nous rejoindre :D\n§bCreatif§7, §6Survie§7 et §4Faction/PVP§7 !"; - - event.getPacket().getServerPings().read(0).setMotD(motd); + event.getPacket().getServerPings().read(0).setMotD(ConfigManager.getInstance().ServerMOTD); } } );