public void handlePacket(Packet p, Channel session) throws Exception { long uID = ((LSPacket) p).getUID(); Logger.event("LOGIN_SERVER sent alert (uID: " + uID + ")"); Player player = world.getPlayer(p.readLong()); if (player != null) { String message = p.readString(); player.getActionSender().sendAlert(message, false); } }
public class AlertHandler implements PacketHandler { /** World instance */ public static final World world = World.getWorld(); public void handlePacket(Packet p, Channel session) throws Exception { long uID = ((LSPacket) p).getUID(); Logger.event("LOGIN_SERVER sent alert (uID: " + uID + ")"); Player player = world.getPlayer(p.readLong()); if (player != null) { String message = p.readString(); player.getActionSender().sendAlert(message, false); } } }