示例#1
0
 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);
   }
 }
示例#2
0
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);
    }
  }
}