@Override
    public void run() {
        while (shouldRun()) {
            try {
                
                // Tell client that we are still here.
                ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
                oos.writeObject(0);

                // Create a list of all Entities in the form of DataPacket's.
                List<DataPacket> packets = new ArrayList<>();
                for (Entity e : ProjectInfernoServer.getMap().getEntities()) {
                    packets.add(new DataPacket(e.getId(), e.getLocation().getX(),
                            e.getLocation().getY(), e.getType(), (e.getType() == EntityType.PLAYER ? ((Player) e).getUsername() : null)));
                }

                // Send DataPacket list to client.
                oos = new ObjectOutputStream(socket.getOutputStream());
                oos.writeObject(packets);
                
                // Recieve the clients new Location & update.
                ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
                DataPacket playerUpdate = (DataPacket) ois.readObject();
                ((Player) ProjectInfernoServer.getMap().getEntity(playerUpdate.id)).setLocation(playerUpdate.x, playerUpdate.y);
                
            } catch (Exception ex) {
                // If client is not there, remove them.
                ProjectInfernoServer.removeConnection(username, 1);
            }
        }

    }