Correction de bug d'affichage du MOTD dans la liste Multijoueur

This commit is contained in:
Marc Baloup 2015-01-24 01:08:59 -05:00
parent 2f2ad0974b
commit af3a81ee43

View File

@ -78,11 +78,11 @@ public class PacketOutServerInfoListener {
list.add(new WrappedGameProfile("", "§cStaff connecté :")); list.add(new WrappedGameProfile("", "§cStaff connecté :"));
for (Player p : plAdmin) for (Player p : plAdmin)
{ {
list.add(new WrappedGameProfile("", " - "+p.getDisplayName())); list.add(new WrappedGameProfile("", "§7 - "+p.getDisplayName()));
} }
for (Player p : plModo) for (Player p : plModo)
{ {
list.add(new WrappedGameProfile("", " - "+p.getDisplayName())); list.add(new WrappedGameProfile("", "§7 - "+p.getDisplayName()));
} }
} }
if (!plPlayer.isEmpty() || !plPlayerPremium.isEmpty() || !plPlayerUltimate.isEmpty()) if (!plPlayer.isEmpty() || !plPlayerPremium.isEmpty() || !plPlayerUltimate.isEmpty())
@ -91,21 +91,27 @@ public class PacketOutServerInfoListener {
for (Player p : plPlayerUltimate) for (Player p : plPlayerUltimate)
{ {
list.add(new WrappedGameProfile("", " - "+p.getDisplayName())); list.add(new WrappedGameProfile("", "§7 - "+p.getDisplayName()));
} }
for (Player p : plPlayerPremium) for (Player p : plPlayerPremium)
{ {
list.add(new WrappedGameProfile("", " - "+p.getDisplayName())); list.add(new WrappedGameProfile("", "§7 - "+p.getDisplayName()));
} }
for (Player p : plPlayer) for (Player p : plPlayer)
{ {
list.add(new WrappedGameProfile("", " - "+p.getDisplayName())); list.add(new WrappedGameProfile("", "§7 - "+p.getDisplayName()));
} }
} }
event.getPacket().getServerPings().read(0).setPlayers(list); event.getPacket().getServerPings().read(0).setPlayers(list);
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(motd);
} }
} }
); );