blob: 2b5f4b71a3125102886b9714554624a96bb71044 [file] [log] [blame] [raw]
package net.glowstone.msg.handler;
import net.glowstone.entity.GlowPlayer;
import net.glowstone.msg.KickMessage;
import net.glowstone.msg.ServerListPingMessage;
import net.glowstone.net.Session;
public class ServerListPingMessageHandler extends MessageHandler<ServerListPingMessage> {
@Override
public void handle(Session session, GlowPlayer player, ServerListPingMessage message) {
session.send(new KickMessage(session.getServer().getMOTD() + "\u00A7" + session.getServer().getOnlinePlayers().length
+ "\u00A7" + session.getServer().getMaxPlayers()));
}
}