public void readEntityList(ByteBuffer toRead)
   {
       boolean done;
        world.entityList.clear();
        done = false;
        try
        {
            while (!done)
            {
                if (!toRead.hasRemaining()) break;
                String className = Server.getString(toRead);
                Class[] args1 = new Class[2];
                args1[0] = ByteBuffer.class;
                args1[1] = World.class;
                try {
                    Class.forName(className).getMethod("reconstruct",args1).invoke(null, toRead, world);
                    world.entityList.get(world.entityList.size()-1).setID(toRead.getInt());
                } catch (ClassNotFoundException | NoSuchMethodException | SecurityException ex) {
                    Logger.getLogger(APPLET.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        catch (Exception e)
        {
            
        }
   }