Petits correctifs

This commit is contained in:
Marc Baloup 2015-01-24 04:05:58 -05:00
parent d4b8800fb1
commit b917f40f6d
2 changed files with 15 additions and 3 deletions

View File

@ -94,6 +94,10 @@ public class ConfigManager {
ServerMessages_defaultColor = ChatColor.YELLOW.toString(); ServerMessages_defaultColor = ChatColor.YELLOW.toString();
ServerMessages_prefix = ChatColor.YELLOW+"["+ChatColor.WHITE+"Pandacraft"+ChatColor.YELLOW+"] "; //configFile.getString("server_messages_prefix"); 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(); initChatAnalysisBadWord();
initCommandAlias(); initCommandAlias();
@ -153,6 +157,11 @@ public class ConfigManager {
message.put("permissions", "pandacraft.grade.default"); message.put("permissions", "pandacraft.grade.default");
Automessages_messages.add(message); Automessages_messages.add(message);
message = new HashMap<String, String>();
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<String, String>(); message = new HashMap<String, String>();
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("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", "*"); message.put("permissions", "*");
@ -343,5 +352,9 @@ public class ConfigManager {
public String ServerMOTD;
} }

View File

@ -14,6 +14,7 @@ import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketEvent; import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.WrappedGameProfile; 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.PandacraftUtils;
import net.mc_pandacraft.java.plugin.pandacraftutils.plugin_interface.EssentialsInterface; 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); 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(ConfigManager.getInstance().ServerMOTD);
event.getPacket().getServerPings().read(0).setMotD(motd);
} }
} }
); );