public void received(Connection c, Object o)
    {
        if(o instanceof Packet)
        {
            Packet p = ((Packet)o);
            p.decompressData();
//            BlockyMain.console("Received packet "+p.name);
            if(p.name.equals("Ping+infos response"))
            {
                try
                {
                    long ping = System.currentTimeMillis()-this.pingSentAt;
                    ByteArrayInputStream input = new ByteArrayInputStream(p.data);
                    DataInputStream in = new DataInputStream(input);
                    int nbrPlayers = in.readInt();
                    int maxPlayers = in.readInt();
                    String serverName = in.readUTF();
                    long serverWorldTime = in.readLong();
                    in.close();
                    input.close();
                    System.out.println("Ping request on server: "+serverName);
                    System.out.println("===================================");
                    System.out.println("Number of connected players: "+nbrPlayers);
                    System.out.println("Max players: "+maxPlayers);
                    System.out.println("Ping: "+ping);
                    System.out.println("WorldTime: "+serverWorldTime);
                    System.out.println("===================================");
                    if(pingRequest)
                        c.close();
                    pingSentAt = System.currentTimeMillis();
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
            else
            {
                if(p.name.equals("AuthPacket"))
                {
                    NetworkCommons.sendPacketTo(createAuthPacket(pingRequest ? ConnectionType.INFOS : ConnectionType.GAME), false, c);
                    seemsConnected = true;
                }
                else
                {
                    packetHandler.handlePacket(p, c);
                }
            }
        }
    }