Exemplo n.º 1
0
 public void init() {
   try {
     Logger.log("StarterMap", "Loading Starters");
     BufferedReader reader = new BufferedReader(new FileReader(map));
     String s;
     while ((s = reader.readLine()) != null) {
       starters.add(s);
     }
     Logger.log(
         "StarterMap",
         "Loaded Starter map, There are " + starters.size() + " IP's in Configuration");
   } catch (Throwable e) {
     e.printStackTrace();
   }
 }
Exemplo n.º 2
0
 @Override
 public final void decode(InputStream stream) {
   session.setDecoder(-1);
   int packetId = stream.readUnsignedByte();
   switch (packetId) {
     case 14:
       decodeLogin(stream);
       break;
     case 15:
       decodeGrab(stream);
       break;
     default:
       if (Settings.DEBUG) Logger.log(this, "PacketId " + packetId);
       session.getChannel().close();
       break;
   }
 }